<UIImagePickerControllerDelegate, UINavigationControllerDelegate>

-(void)btnList:(id)sender
{
UIImagePickerController *imagePicker = [[UIImagePickerController alloc]init];
imagePicker.delegate = self;

imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;

//imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera

[self presentModalViewController:imagePicker animated:YES];
[imagePicker release];
}

-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)selectedImage editingInfo:(NSDictionary *)editingInfo
{
imgView.image = selectedImage;
[self dismissModalViewControllerAnimated:YES];
}

'Object-C' 카테고리의 다른 글

archiving  (0) 2010.10.07
pickerView  (0) 2010.10.07
imagePicker  (0) 2010.10.07
pageControl  (0) 2010.10.07
ScrollView  (0) 2010.10.07
customCell  (0) 2010.10.07

+ Recent posts