开发者

how to know image picking in uiimagepicker?

开发者 https://www.devze.com 2023-02-19 04:21 出处:网络
how to know image picking in uiimagepicker and how to modify the picking image or how to call after image picking? and h开发者_开发百科ow to get the picking image as background image for next view usi

how to know image picking in uiimagepicker and how to modify the picking image or how to call after image picking? and h开发者_开发百科ow to get the picking image as background image for next view using xcode for iphone?


You can refer UIImagePickercontroller and use the UIImagePickerController's delegate methods UIImagePickerDelegate

     - (void)imagePickerController:(UIImagePickerController  *)picker didFinishPickingMediaWithInfo:(NSDictionary  *)info
{
// Get the image picked by the image picker
UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
//Do something
}


Use the UIImagePickerController's delegate methods:

- (void)imagePickerController:(UIImagePickerController *)pickerdidFinishPickingMediaWithInfo:(NSDictionary *)info {

   // Get the image picked by the image picker
   UIImage *image :[info objectForKey:@"UIImagePickerControllerOriginalImage"] ;
   //Do something
   [picker dismissModalViewControllerAnimated:YES];
}

Or I am sure this link may be helpful to you:

http://www.icodeblog.com/2009/07/28/getting-images-from-the-iphone-photo-library-or-camera-using-uiimagepickercontroller/

0

精彩评论

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