UIImagePickerController
#pragma mark 从用户相册获取活动图片
- (void)pickImageFromAlbum
{
imagePicker =
[[UIImagePickerController alloc] init];
imagePicker.delegate =self;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
imagePicker.allowsEditing =YES;
[self
presentModalViewController:imagePicker animated:YES];
}
----------------------------------------
#pragma mark 从摄像头获取活动图片
- (void)pickImageFromCamera
{
imagePicker =
[[UIImagePickerController alloc] init];
imagePicker.delegate =self;
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
imagePicker.allowsEditing =YES;
[self
presentModalViewController:imagePicker animated:YES];
}
原文地址:http://www.cnblogs.com/ly1973/p/3705736.html