簡體   English   中英

檢查UIImage是否為風景圖像

[英]Checking if an UIImage is a landscape image

如何檢查UIImage是否為風景圖像(在Swift中)?

我已經試過這段代碼:

if self.imageView.image?.imageOrientation == .Left || self.imageView.image?.imageOrientation == .Right {
            self.isLandscape=true
        }

但這沒用。

謝謝

關於什么:

let image: UIImage = //your image
image.size.width > image.size.height

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM