相关疑难解决方法(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
查看次数

UIImagePickerController允许编辑不起作用

我正在使用UIImagePickerController来允许用户拍照.我想让他之后编辑它,但无论我做什么,我什么也得不到.这是我的代码(我正在使用Xamarin):

UIImagePickerController imagePicker = new UIImagePickerController ();
                // set our source to the camera
                imagePicker.SourceType = UIImagePickerControllerSourceType.Camera;
                // set what media types
                //imagePicker.MediaTypes = UIImagePickerController.AvailableMediaTypes (UIImagePickerControllerSourceType.Camera);
                // show the camera controls
                imagePicker.ModalPresentationStyle = UIModalPresentationStyle.CurrentContext;
                imagePicker.ShowsCameraControls = true;
                imagePicker.AllowsEditing = true;
                imagePicker.SetEditing (true,true);
                imagePicker.PreferredContentSize = new SizeF(900,600);
                imagePicker.CameraCaptureMode = UIImagePickerControllerCameraCaptureMode.Photo;
                imagePicker.Title="taste.eat. image";
                // attach the delegate
                imagePicker.Delegate = new ImagePickerDelegate();
                // show the picker
                NavigationController.PresentViewController(imagePicker, true,null);
Run Code Online (Sandbox Code Playgroud)

我错过了什么吗?

编辑:

我已经按照教程进行了操作,并且我正在使用矩形进入屏幕,但是如果我平移或缩放它,只要我抬起手指就会快速回到中心.是否可以从照片应用程序进入此屏幕?

来自照片应用程序的图像

iphone uiimagepickercontroller xamarin.ios ios xamarin

15
推荐指数
3
解决办法
2万
查看次数