Getting images from your photo library is as easy as about... 10 lines of code. I was pretty impressed how the API made it so easy. I'm putting in some player profile picture feature in there.
写真アルバムから写真をゲットすんのにめちゃくちゃ簡単なことにびっくり。
ステータスに自分の写真を入れれるようにした。
@interface StatusViewController : UIViewController <UIImagePickerControllerDelegate, UINavigationControllerDelegate> {
- (IBAction)showImagePicker:(id)sender
{
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePickerController.delegate = self;
imagePickerController.allowsImageEditing = YES;
[self presentModalViewController:imagePickerController animated:YES];
[imagePickerController release];
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
[self dismissModalViewControllerAnimated:YES];
}
hey thanks.. amazing how little code there is for this component out there :)
ReplyDeleteGlad to be help!
ReplyDeleteYeah, this UIImageViewController was a huge surprise for me too.
THANKSSSSSSSSSSS
ReplyDelete