2013-01-24 25 views
1

後我的RootViewController的是基於UITabViewController 和標籤頁面中的一個,我初始化一個UINavigationController推視圖。怪異動畫的UIImagePickerController

UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:addStoreViewController]; 

[self presentModalViewController:navController animated:YES]; 

然後我把另一種觀點認爲在addStoreViewController 下面的代碼:

PictureViewController *pictureViewController = [[PictureViewController alloc] init];  
[self.navigationController pushViewController:pictureViewController animated:YES]; 

最後,我想在pictureViewController 使用的UIImagePickerController這裏是從我的相機按鈕的代碼:

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; 
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; 
imagePicker.delegate = self; 

[self presentModalViewController:imagePicker animated:YES]; 

我的視圖控制器的級別:

[UITabViewController]> [UINavigationController的] - > [AddStoreViewController] - > [PictureViewController]> [UIImagePickerViewController]

一切工作正常,但有一兩件事很奇怪。在呈現UIImagePickerViewController之後,其他視圖將受到strage動畫的影響。 視圖中的整個用戶界面會顯示一個額外的動畫,喜歡的UITextField,UINavigationBar的,UIButtons ...您的視圖中看到的一切。即使你打字,文字也會顯示怪異的動畫! 我的代碼有什麼問題嗎?我搜索這個問題很長一段時間,但無法找到答案。 任何人都可以幫助我嗎?非常感謝!

回答

1

哎呀我找到了答案,即時通訊這樣一個白癡... 它是由我UIView動畫所致。 我忘了在我的動畫的末尾插入此[UIView commitAnimations]

+0

感謝ü這麼多張貼這個問題! 我有同樣的問題,我的uiimagepicker元素觸摸閃爍。 我錯過了我的一個子視圖中的commitAnimations。 我搜索了很多,你終於找到了我唯一的一個。 希望我的評論可以幫助別人,同時使用Google。 –