views:

482

answers:

2

Hi,

I've created a camera application for iPhone and now I sit and polish the last of it. My application is a collage application where the user can take multiple pictures in a row.

As it is today I have a customized camera view that contains one UIButton for taking the pictures and one UIButton for getting back to the main view.

The problem is that my application is design for landscape mode and the camera control can only show in portrait mode. This makes the design of the GUI a little bit tricky and I now want to move away from having the buttons in the view to having the placed in a toolbar. When you initialize the camera you can set a bunch of different parameters and one of them is UIImagePickerController.toolbarHidden. If I set the value to NO it will show an empty toolbar and my question here is, how do I add items to this toolbar?

I've tried different solutions without any luck.

Thanks, drisse

+1  A: 

Does the standard UIViewController method -setToolBarItems:animated: method not work?

iKenndac
Hi,No it doesn't. I've tried to call that method both from the UIViewController that owns the camera and I've also tried to call that method from inside my own subclass of UIImagePickerController but nothing works. It's very strange that I can decide to hide or show the toolbar but I can't add any items to it!?
drisse
Have you tried, in your subclass of UIImagePickerController, overriding the -toolbar property to return a different toolbar that you create yourself? It's possible that the standard UIImagePickerController is returning a broken/nil toolbar.
iKenndac
That might be a solution, but how do I override a property (You'll have to forgive me I'm a newbie in Objective-C)?
drisse
The strange thing is that I can change the color of the toolbar like this: UIToolbar *tb = self.toolbar;tb.tintColor = [UIColor blackColor];
drisse
A: 

hai

I am also trying the same .. but items are not adding to the toolbar .. any idea why? Is there any otherway to get all images in the photo album into an array ??

SDT