【发布时间】:2012-02-20 21:22:57
【问题描述】:
在我的应用程序第一次运行时,我会向用户显示一个警报视图,以选择 iCloud 或本地文档存储。显示警报视图会导致以下错误:
应用程序的末尾应该有一个根视图控制器 应用程序启动wait_fences:未能收到回复:10004003
为什么会这样?如何在启动时显示警报视图而不出现此错误?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Check the user preferences for document storage options
if (![UserPreferencesHelper userDocumentStoragePreferencesHaveBeenCreated])
{
// User preferences have not been set, prompt the user to choose either iCloud or Local data storage
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Use iCloud?"
message:@"Would you like to store data in iCloud?"
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"No", @"Yes", nil];
[alert show];
}
}
** 更新 **
我应该提到我正在使用带有情节提要的 iOS 5。根视图控制器在情节提要中设置。
【问题讨论】:
标签: iphone objective-c ios ipad ios5