views:

100

answers:

2

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 = [[UIImagePickerController 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.

A: 

Try to shift the toolbar off the screen by changing the frame of it by providing y cordinate more than 480 for iphone.

Ideveloper
I believe creating a custom toolbar in a view and then trying to hide the toolbar in a method does not work under any circumstances. But, I would like any experts thoughts on the matter. Because my next step would be to create a custom camera where the controls are not at the bottom of the screen. This route seems difficult for a newbie...something like tapping the screen to take the picture and showing the re-take or use controls.
MadProfit
FYI. I created a custom toolbar with 4 buttons in the toolbar. But, I believe it is not possible to eliminate the toolbar in code contain within an IBAction id (sender) on the same view. I am now thinking I need to create a separate h and m file to implement the camera without the toolbar.
MadProfit
toolbar.hidden = YES works only for the UINavigation toolbar....It does not work for the UIToolbar.Experts please confirm.
MadProfit
A: 

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

I appreciate the suggestion....but....The above code does not hide the toolbar but eliminates the camera controls. I only want to eliminate the toolbar that I have created and keep the camera controls. If I nix the standard controls then I need to write alternate code such as tap the screen or custom buttons for taking the picture, retake or save to the photo album.
MadProfit