objective-c - When iOS selects a picture and customizes cropping, why can't it be pushed into it?
滿天的星座
滿天的星座 2017-05-02 09:35:20
0
0
676
- (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/...

滿天的星座
滿天的星座

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template