I have created a UIToolBar using the IB. In one view, I have called the camera and the camera controls are masked by the toolbar.
I have tried several methods to hide the toolbar - alpha=0, toolBarHidden, hidesBottomBarWhenPushed and thought how I could re-size the camera view to allow the camera controls to be used. All with no luck.
I believe I must create a custom toolbar and then I can use the hide method.
My camera code is the standard:
UIImagePickerController *imagePicker = [[UIImage开发者_开发问答PickerController alloc] init];
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.allowsEditing = NO;
imagePicker.delegate = self;
[self presentModalViewController:imagePicker animated:YES];
Any code or final direction would be appreciated from this newbie.
Try to shift the toolbar off the screen by changing the frame of it by providing y cordinate more than 480 for iphone.
Use this to "hide" the toolbar. It removes the standard "take picture ,etc" buttons and replaces it with a black bar with the same width/height of the default overlay.
imagePicker.showsCameraControls = NO;
iOS reference
精彩评论