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

185 Views Asked by At

enter image description here- Actually am using UIImagePickerController for my usecase,and if i long press any picture ,it shows Copy/Hide option (as shown in the sample image)

   - I dont want the Copy/Hide feature. 

Guide me with some suggestions if u too have encountered :)...

Thanks in advance...iOS Geeks...PLZ refer my code snippet below....

 ![@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]
2

There are 2 best solutions below

0
On BEST ANSWER

Its orientation issues. UIImagePickerController wont support landscape mode..

Try this code source :: 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;
}
0
On

You'll have to implement your own custom image pickercause I dont think what you are asking for can be done