In my app, I use the old GKImage library for adding pictures and being able to custom crop them easily. This works pretty well, except when it comes to iPad. On iPhone, everything works great. The main issue is this:
When I use an iPad, none of the barButtonItems are clickable.
Here is my code for this view:
The code used to present this controller is:
Is it an issue with presenting the view controller?
When I use an iPad, none of the barButtonItems are clickable.
Here is my code for this view:
Code Block - (void)_actionCancel{ [self.navigationController popViewControllerAnimated:YES]; } - (void)_actionUse{ NSLog(@"PRESSED"); _croppedImage = [self.imageCropView croppedImage]; [self.delegate imageCropController:self didFinishWithCroppedImage:_croppedImage]; } - (void)_setupNavigationBar{ self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(_actionCancel)]; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Use" style:UIBarButtonItemStylePlain target:self action:@selector(_actionUse)]; } - (void)_setupCropView{ self.imageCropView = [[GKImageCropView alloc] initWithFrame:self.view.bounds]; [self.imageCropView setImageToCrop:sourceImage]; [self.imageCropView setResizableCropArea:self.resizeableCropArea]; [self.imageCropView setCropSize:cropSize]; [self.view addSubview:self.imageCropView]; } #pragma mark - #pragma Super Class Methods - (id)init{ self = [super init]; if (self) { // Custom initialization } return self; } - (void)viewDidLoad{ [super viewDidLoad]; self.title = @"Choose Photo"; [self _setupNavigationBar]; [self _setupCropView]; [self.navigationController setNavigationBarHidden:NO]; } - (void)viewWillLayoutSubviews{ [super viewWillLayoutSubviews]; self.imageCropView.frame = self.view.bounds; }
The code used to present this controller is:
Code Block self.imagePicker = [[GKImagePicker alloc] init]; self.imagePicker.cropSize = CGSizeMake(280, 280); self.imagePicker.delegate = self; self.imagePicker.imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentViewController:self.imagePicker.imagePickerController animated:YES completion:nil];
Is it an issue with presenting the view controller?