I have a tabbar app and the second tab goes to a navigation controller-style view.
on the rightButton of the navigation bar I have a camera icon to present modally the ImagePicker. However it will not become fullscreen but instead underlay the tabbar.
The first image show that I have a navigation controller container this first rootView which has a camera button. When click it will just create a UIImagePickerController and present it modally. Nothing special.
first http://www.jobline.com.sg/images/no_use/1.png
However the result of the camera is missing the control to take/cancel picture like this:
second http://www.jobline.com.sg/images/no_use/2.png
How do I hide the UITabBar and able to see the camera control? I know it can be done because the Skype profile tab also have a camera and then present a UIActionSheet to "Take picture" and then the full-screen camera view. I believe the profile tab has navigation controller as its root view also.
Thanks a million for your help.
Here is the code that I used:
- (void)takePicture:(id)sender {
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
} else {
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
}
[self presentModalViewController:imagePicker animated:YES];
}
It is a fairly straightforward code of presenting an imagePicker modally. So I wonder why there is no camera control and how come my tabbar can overlap it. Is it because of my view hierarchy?
sample code
and it seems to work fine. Can you tell me what've you done differently so that I can reproduce the error? – Deepak DanduproluClaimController *claimController = [[ClaimController alloc] init];
UINavigationController *claimNavigationController = [[UINavigationController alloc] initWithRootViewController:claimController];
at thedidFinishLaunchingWithOptions
. – mech