내 앱이 iPad의 모든 방향에서 작동하고, iPhone 6 Plus에서 가로 및 세로를 지원하고, 다른 장치에서만 세로 방향을 지원하도록하고 싶습니다.iPhone 6 Plus에서 방향이 잘못 되었습니까?
그러나 iPhone 6/6s Plus에서는 올바르게 작동하지 않습니다. 회전이 이상하고 뷰 컨트롤러가 종종 잘못된 방향으로 나타납니다.
func application(application: UIApplication, supportedInterfaceOrientationsForWindow window: UIWindow?) -> UIInterfaceOrientationMask {
let height = window?.bounds.height
if height > 736.0 {
// iPad
return .All
} else if height == 736.0 {
// 5.5" iPhones
return .AllButUpsideDown
} else {
// 4.7", 4", 3.5" iPhones
return .Portrait
}
}
이 작업을 수행하는 올바른 방법은 무엇입니까 :
이 내가 현재 내 AppDelegate.swift
에있는 무엇인가?