IOS中的相机应用程序

时间:2016-02-29 09:50:03

标签: ios objective-c uiimageview uiimage uiimagepickercontroller

我是iOS开发的新手,我已经制作了一个具有

的示例应用程序
UIImageView and UIButton

单击按钮我允许用户从设备摄像头拍摄照片,

拍完照片后,我有两个选择使用照片或重拍,

我还希望允许用户旋转和裁剪图像,我已经设置了

picker.allowsEditing = YES;

但它对我没有任何帮助, 如何在我的应用程序中加入此类功能。

这是我目前按下按钮的代码片段,

UIImagePickerController *picker = [[UIImagePickerController alloc]init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:picker animated:YES completion:NULL];

0 个答案:

没有答案