objective-c - iOS选择图片,自定义裁剪时.为什么不能push进去?

 mobiledu2502873093 发布于 2022-10-25 02:19
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(nonnull NSDictionary *)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];
这句没作用

选择图片的时候点击无反应
控制台提示
[Generic] Creating an image format with an unknown type is an error
这为什么啊?

我该怎么做才能push进去,有个静态库的可以,但是不知道怎么做的
还有个问题就是present进去的话,点击取消的时候,直接回到主界面,而不是选择图片
github 地址:https://github.com/ShelinShel...

那个可以push的版本:https://github.com/wangluhui/...

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有