How to disable copy / hide function in UIImagePickerController on long press on image ...?
- Actually I am using UIImagePickerController for my utility and if I press any image for a long time it shows the Copy / Hide option (as shown in the sample)
- I dont want the Copy/Hide feature.
Direct me with some suggestions if you are facing too :) ...
Thanks in advance ... iOS Geeks ... plz link to 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]
+3
source to share
2 answers
Questions of his orientation. UIImagePickerController
does not 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;
}
+3
source to share