开发者

iPhone Camera - Choose from Library or Take Photo

开发者 https://www.devze.com 2023-03-18 11:51 出处:网络
Please look at the image below !! So in this image... You can see a pop-up from the bottom which gives the user 3 options when he \'taps\' the \'Camera\' button.

Please look at the image below !!

iPhone Camera - Choose from Library or Take Photo

So in this image... You can see a pop-up from the bottom which gives the user 3 options when he 'taps' the 'Camera' button.

What is that view ? Is it a modal view controller which gets dismissed when an option is selected ?

Edit:

So it is UIActionSheet ! I have one more question on this, but StackOverflow would love it if I could edit the question rather than putting up a new one.

So yes.. The option "Take Photo" uses the UIImagePickerController, and the "Cancel" butto开发者_StackOverflown is the resignFirstResponder... What about "Choose From Library" ? How do I access the photos in the iphone photo library ? Any sample code ?

Thanks !


UIActionSheet


This is standard UIActionSheet control

Edit: Images from library can also be accessed using UIImagePickerController. For that you need to set picker's sourceType proprety to UIImagePickerControllerSourceTypePhotoLibrary (Check class reference for more details and for all sourceType values)

0

精彩评论

暂无评论...
验证码 换一张
取 消