Search code examples
iphoneuser-interfaceuiimagepickercontrolleruitabbaruipagecontrol

UIImagePickerController does not work correctly with uipagecontrol and uitabbar


I am trying to open UIImagePickerController from 3 different view controllers. but the problem is that this 3 view controllers are bind together as i am using a pagecontroller (to swipe between these 3 view controllers) and a uitabbar as a parent of these 3 view controllers. So whenever i tried to open UIImagePickerController the page controller and tabbar still covers the bottom part so i can not take a picture.

Can anyone please help me about this? I tried in google but no good solutions though. If my problem is not clear to anyone please ask. I will try to make it make it simpler as much as i can...


Solution

  • Are you present the image picker from self, like this:

    [self presentModalViewController:picker animated:YES];
    

    If so, you should try:

    [self.tabBarController presentModalViewController:picker animated:YES];
    

    (the picker will then be in the same context as the tabBarController)