Set dimensions for UIImagePickerController move and scale cropbox
Not possible with UIImagePickerController unfortunately. The solution I recommend is to disable editing for the image picker and handle it yourself. For instance, I put the image in a scrollable, zoomable image view. On top of the image view is a fixed position "crop guide view" that draws the crop indicator the user sees. Assuming the guide view has properties for the visible rect (the part to keep) and edge widths (the part to discard) you can get the cropping rectangle like so. You can use the UIImage+Resize category to do the actual cropping.
CGRect cropGuide = self.cropGuideView.visibleRect;
UIEdgeInsets edges = self.cropGuideView.edgeWidths;
CGPoint cropGuideOffset = self.cropScrollView.contentOffset;
CGPoint origin = CGPointMake( cropGuideOffset.x + edges.left, cropGuideOffset.y + edges.top );
CGSize size = cropGuide.size;
CGRect crop = { origin, size };
crop.origin.x = crop.origin.x / self.cropScrollView.zoomScale;
crop.origin.y = crop.origin.y / self.cropScrollView.zoomScale;
crop.size.width = crop.size.width / self.cropScrollView.zoomScale;
crop.size.height = crop.size.height / self.cropScrollView.zoomScale;
photo = [photo croppedImage:crop];
Change cropper size of UIImagePickerController
Those errors are fixed by importing UIKit/UIKit.h to GKImagePicker.h
Related Topics
How to I Import 3Rd Party Frameworks into Xcode Playground
iOS 8 Swift - Tableview with Embedded Collectionview
Trying to Set Only Time in Uidatepicker in Swift 2.0
Will Items in iOS Keychain Survive App Uninstall and Reinstall
It's Possible to Change Push Notification Message Before Display on Device from iOS Side
Access Container View Controller from Parent iOS
Sharing Data Between an iOS 8 Share Extension and Main App
Replacement for Stringbyaddingpercentescapesusingencoding in iOS9
Failed to Emit Precompiled Header for Bridging Header
Differencebetween Pan and Swipe in iOS
"Untrusted App Developer" Message When Installing Enterprise iOS Application
Performance Testing in Swift Using Tdd
Uibutton Fails to Properly Register Touch in Bottom Region of iPhone Screen
Generate Random Numbers with a Given Distribution
Autolayout - Make Height of View Relative to Half Superview Height