yuhua
yuhua

Reputation: 1249

weird animation after UIImagePickerController

My rootViewController is based on UITabViewController and one of the tab view, that i initialize a UINavigationController to push a view.

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

[self presentModalViewController:navController animated:YES];

then i push another view in the addStoreViewController here's the code:

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

finally, i want to use UIImagePickerController in pictureViewController here is the code from my camera button:

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

[self presentModalViewController:imagePicker animated:YES];

The level of my view controller:

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

Everything works fine but there's one thing weird. After presenting UIImagePickerViewController, other view will be affected with strage animation. The whole UI in the view will display with an extra animation, like UITextField, UINavigationBar, UIButtons...everything you see on the view. Even when you typing and the text will display with weird animation! is there anything wrong with my code? I googled this issue for a long time but can't find out. could anyone help me? thank you so much!

Upvotes: 1

Views: 143

Answers (1)

yuhua
yuhua

Reputation: 1249

Oops i found the answer and im such an idiot... it was caused by my UIView Animation. I forgot to insert this [UIView commitAnimations] in end of my animation.

Upvotes: 1

Related Questions