views:

444

answers:

2

Hello,

I'm writing an application that uses UIImagePickerController. I'd like to give users choice of source of pictures, either take a new photo or choose from existing ones. I'd like to create exactly the same selection interface as is in twitterfon or in safari when you hold tap on the link. It looks like some standard SDK thing but I have completely no clue where to find some sample code. I've googled for hours and I have nothing.

I would really appreciate any tips. Thank you

A: 

That would be an UIActionSheet. Make sure to point its delegate property to your implementation of the UIActionSheetDelegate protocol to catch clicks on the buttons you define.

Jacob H. Hansen
A: 

What you're looking for is the UIActionSheet. The documentation has everything you need to set one up and how to respond to which button is pressed.

You'll also want to use the constants defined for the UIImagePickerController sources, namely

UIImagePickerControllerSourceTypeCamera
UIImagePickerControllerSourceTypePhotoLibrary
Jasarien