- (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];
這句話沒作用
選擇圖片的時候點擊無反應
控制台提示
[Generic] Creating an image format with an unknown type is an error
這為什麼啊?
我該怎麼做才能push進去,有個靜態庫的可以,但是不知道怎麼做的
還有個問題就是present進去的話,點擊取消的時候,直接回到主界面,而不是選擇圖片
github 地址:https://github.com/ShelinShel...
那個可以push的版本:https://github.com/wangluhui/...