相关疑难解决方法(0)

UIImagePicker允许编辑卡在中心

我有一个UIImagePicker适用于一种UIImagePickerControllerSourceTypePhotoLibrary,但是当我使用UIImagePickerControllerSourceTypeCamera时,编辑框不能从图像的中心移动.因此,如果图像高于宽度,则用户无法将编辑框移动到图像的顶部正方形.

任何人都知道为什么会这样吗?它仅在源来自摄像机而不是库时才会发生.

编辑:一些代码!!!

if (actionSheet.tag == 2) {
    if (buttonIndex == 0) { // Camera
        // Check for camera
        if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] == YES) {
            // Create image picker controller
            UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];

            // Set source to the camera
            imagePicker.sourceType =  UIImagePickerControllerSourceTypeCamera;
            imagePicker.allowsEditing = YES;

            // Delegate is self
            imagePicker.delegate = self;

            // Show image picker
            [self presentViewController:imagePicker 
                               animated:YES 
                             completion:^(void) {
                             }];
        }
    }
    else if (buttonIndex == 1) { // Photo Library
        if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary] == …
Run Code Online (Sandbox Code Playgroud)

iphone uiimagepickercontroller ios

39
推荐指数
1
解决办法
8381
查看次数

标签 统计

ios ×1

iphone ×1

uiimagepickercontroller ×1