- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(nonnull NSDictionary<NSString *,id> *)info {
UIImage *originalImage = info[UIImagePickerControllerOriginalImage];
CGFloat width = self.view.frame.size.width;
CGFloat height = self.view.frame.size.height;
CGRect cropFrame = CGRectMake(50 / 2.0, (height - width - 50) / 2.0, width - 50, width - 50);
ImageCropperViewController *imageCropperViewController = [[ImageCropperViewController alloc] initWithImage:originalImage cropFrame:cropFrame limitScaleRatio:3.0f];
imageCropperViewController.delegate = self;
[picker presentViewController:imageCropperViewController animated:YES completion:nil];// 这里不能用push,why
[picker.navigationController pushViewController:imageCropperViewController animated:YES];
}
[picker.navigationController pushViewController:imageCropperViewController animated:YES];
This sentence has no effect
No response when clicking when selecting an image
Console prompt
[Generic] Creating an image format with an unknown type is an error
Why is this?
What should I do to push it in? There is a static library that can be used, but I don’t know how to do it.
Another problem is that when present is entered, when you click Cancel, it returns directly to the main interface instead of selecting Picture
github address:https://github.com/ShelinShel...
The version that can be pushed:https://github.com/wangluhui/...