func checkIdiom(){
let deviceIdiom = UIScreen.main.traitCollection.userInterfaceIdiom
// 2. check the idiom
switch (deviceIdiom) {
case .pad:
Utils.idiom_saveCache(size: "iPad")
break
case .phone:
Utils.idiom_saveCache(size: "iPhone")
break
default:
Utils.idiom_saveCache(size: "iPhone")
break
}
}
Không có nhận xét nào:
Đăng nhận xét