내 응용 프로그램을 처음 실행할 때 사용자에게 iCloud 또는 로컬 문서 저장소를 선택하라는 경고보기를 표시합니다. 경고보기를 표시하면 다음 오류가 발생합니다.왜 응용 프로그램에서 UIAlertView를 보여줍니다 : didFinishLaunchingWithOptions : 오류가 발생 했습니까?
Applications are expected to have a root view controller at the end of application launch wait_fences: failed to receive reply: 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];
}
}
** UPDATE **
나는 스토리 보드에서 iOS 5를 사용하고 있음을 내가 언급해야한다. 루트보기 컨트롤러는 스토리 보드에 설정됩니다.
대런, 고마워! 그게 완벽하게 =). 나는이 벽에 잠시 벽에 머리를 박고 있었다. –