在我的应用程序中,用户可以拍摄横向或纵向照片 . 拍照后,使用以下代码将其传输到另一个 UIViewController :
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let sp = storyboard.instantiateViewControllerWithIdentifier("sendPhoto") as! sendPhotoScreen
sp.photoImage = newImage
self.presentViewController(sp, animated: true, completion: nil)
在sendPhotoScreen中,如何将图像显示为纵向
如果它被视为肖像,我如何将图像显示为风景
如果它被视为景观
1 回答
你可以检查宽高比 .