Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to have ability to hide Constrain option #70

Open
johnnielin opened this issue Nov 10, 2014 · 4 comments
Open

Request to have ability to hide Constrain option #70

johnnielin opened this issue Nov 10, 2014 · 4 comments

Comments

@johnnielin
Copy link

Hey, thanks for the nice lib.

Now since I need to keep the cropped image compatible(same shape) among all users it'd be great if you can provide a way to hide Constrain option. The default value of the Constrain could be configurable ideally.

Cheers,

@michaelpginn
Copy link

Right now the best way appears to be to use a embedded view instead of the default view controller, but this would be greatly appreciated

@DenVog
Copy link

DenVog commented Apr 13, 2015

If you go to the PECropViewController, you can simply comment out the code that displays that button on the lower toolbar in viewDidLoad:
if (!self.toolbarItems) { UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; UIBarButtonItem *constrainButton = [[UIBarButtonItem alloc] initWithTitle:PELocalizedString(@"Constrain", nil) style:UIBarButtonItemStyleBordered target:self action:@selector(constrain:)]; self.toolbarItems = @[flexibleSpace, constrainButton, flexibleSpace]; } self.navigationController.toolbarHidden = self.toolbarHidden;

@johnnielin
Copy link
Author

Hey DenVog,
Generally I am trying to avoid any modification to pod implementation because that will cause extra work every time when I update the pod. Surely that'd be an option if there's no other workaround. Thanks for the input.

@scottrhoyt
Copy link

How about make the modification so that you can set a flag to determine if the Constrain option is shown and then submit a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants