![](/img/trans.png)
[英]How do you implement swipe-able image stacks like the Photo app using the iPhone SDK?
[英]how do I implement “Choose Existing Photo” in my app like in default iphone phonebook?
我想開發一個應用程序,其功能與iphone電話簿捕獲圖像和選擇iamge相同,
我該怎么做才能做到這一點
我為UIActionSheet制作了一個UIImageView和一個按鈕,
現在我想在我的應用程序中執行“拍照”和“選擇現有照片”選項
幫助我,我很感激
提前致謝 ....
嘿@Veer你需要使用UIImagePickerController
http://iphone.zcentric.com/2008/08/28/using-a-uiimagepickercontroller/
它有相同的示例。
編輯您可以使用這些方法獲取UIImageView對象中的圖像
- (void)selectPhotos
{
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
picker.delegate = self;
[self presentModalViewController:picker animated:YES];
[picker release];
}
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingImage:(UIImage *)image
editingInfo:(NSDictionary *)editingInfo
{
imageView.image = image;
[[picker parentViewController] dismissModalViewControllerAnimated:YES];
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.