OGeek|极客世界-中国程序员成长平台

标题: ios - 如何让 UIImagePickerController 裁剪 16 :9 ratio [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 19:33
标题: ios - 如何让 UIImagePickerController 裁剪 16 :9 ratio

您好,我目前正在使用 UIImagePickerController,它默认裁剪图像平方。有没有办法让它以 16:9 的纵横比进行裁剪?我在网上搜索过,但没有找到太多结果。



Best Answer-推荐答案


试试这个GithubLink

let cropVC = ShittyImageCropVC(frame: (self.navigationController?.view.frame)!, image: imageToCrop, aspectWidth: 16, aspectHeight: 9)
self.navigationController?.present(cropVC, animated: true, completion: nil)

关于ios - 如何让 UIImagePickerController 裁剪 16 :9 ratio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43580924/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4