views:

1334

answers:

4

I have a UIImagePickerController as one view in a TabBar setup. Is it possible to tell the UIImagePickerController to not show the Cancel button in the top navigation bar when browsing photos libraries?

+1  A: 

Not in a supported way. UIImagePickerController is designed to be shown as a modal controller.

millenomi
Ah ha! That now makes it all crystal clear. Thanks millenomi for the answer.
danimal
A: 

Millenomi, how then do you suggest I go about it if I had to do it. Is there a documented SDK to go and get the window handle of the Cancel button?

I think you have two options: first reimplement UIImagePickerControl yourself, but without the cancel button; or change your user interface so having the cancel button makes sense. For consistency with other applications I'd recommend the latter option.
Stephen Darlington
+2  A: 

I just wrote a short blog article on customizing the view hierarchy created by UIImagePickerController. It's targetted at the camera capture mode rather than photo library, but the principles should be the same.

See: The Airsource - Views of UIImagePickerController

Airsource Ltd
A: 

I think that the problem is that the cancel button serves dual purpose. Once you take the picture it becomes a "Retake" button. If you hid or removed the cancel button, how would you retake the picture?