objective-c - iOS選擇圖片,自訂裁切時.為什麼不能push進去?
滿天的星座
滿天的星座 2017-05-02 09:35:20
0
0
551
- (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/...

滿天的星座
滿天的星座

全部回覆(0)
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!