关于图片选择器的处理

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];
}

posted @ 2014-05-03 22:48  看谷秀  阅读(224)  评论(0编辑  收藏  举报