长按图像时如何禁用 UIImagePickerController 中的 Copy/Hide 功能...?

How to disable the Copy/Hide feature in UIImagePickerController when long pressing a image ...?

- 实际上我在用例中使用 UIImagePickerController,如果我长按任何图片,它会显示 Copy/Hide 选项(如示例图片所示)

   - I dont want the Copy/Hide feature. 

如果你也遇到过,请给我一些建议:)...

提前致谢...iOS 极客...请参考下面的代码片段....

 ![@IBAction func allPhotosItemButtonPressed(sender: UIBarButtonItem) {
        let imagePicker: UIImagePickerController = UIImagePickerController()
        imagePicker.delegate = self
        imagePicker.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
        let popOver: UIPopoverController = UIPopoverController(contentViewController: imagePicker)
        popOver.presentPopoverFromBarButtonItem(sender, permittedArrowDirections: UIPopoverArrowDirection.Any, animated: true)
    }![enter image description here][1]

您必须实现自己的自定义图像选择器,因为我认为您的要求无法实现

方向问题。 UIImagePickerController 不支持横向模式..

试试这个代码 来源::https://gist.github.com/mkeremkeskin/0ed9fc4a2c0e4942e451

- (BOOL)shouldAutorotate {

    UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];

    if ( orientation == UIDeviceOrientationPortrait
        | orientation == UIDeviceOrientationPortraitUpsideDown) {

        return YES;
    }

    return NO;
}

- (NSUInteger)supportedInterfaceOrientations {

    return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown);
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
    UIDevice* device = [UIDevice currentDevice];
    if (device.orientation == UIInterfaceOrientationPortraitUpsideDown) {
        return UIInterfaceOrientationPortraitUpsideDown;
    }
    return UIInterfaceOrientationPortrait;
}