user717452
user717452

Reputation: 111

Setting Move and Scale Box for iOS

I have seen several apps that after you take a picture, it shows a view for Move and Scale your picture, with a box showing what the resulting image will look like. My app takes a picture the user takes or picks from library, and adds it to a PDF file. I need this file to be a certain size to fit on the PDF, so I need to set the move and scale box accordingly, but I cannot find any documentation on how to do this. Any suggestions?

Upvotes: 1

Views: 1792

Answers (2)

Viacheslav
Viacheslav

Reputation: 1276

The UIImagePickerController picker ONLY performs 320x320 cropping.

Try using this: https://github.com/gekitz/GKImagePicker (GKImagePicker)

Sample Code:

self.imagePicker = [[GKImagePicker alloc] init];
self.imagePicker.cropSize = CGSizeMake(320, 90);
self.imagePicker.delegate = self;

[self presentModalViewController:self.imagePicker.imagePickerController animated:YES];

Upvotes: 0

Kjuly
Kjuly

Reputation: 35131

Just set the UIImagePickerController instance's allowsEditing to YES.

_imagePickerController = [[UIImagePickerController alloc] init];
...
_imagePickerController.delegate = self;
_imagePickerController.allowsEditing = YES;

Upvotes: 2

Related Questions