dimanche 25 janvier 2015

How to force portrait orientation if device is in landscape orientation when the app launches in iOS 8

My application allows all four orientations, but the rootviewcontroller should only allow portrait orientation.


I override the supportedInterfaceOrientations method in my rootviewcontroller, but if the device is held in landscape orientation when the app launches then the view controller displayed incorrectly in landscape orientation even though only portrait orientation is allowed. This is an iOS 8 specific issue.



override func supportedInterfaceOrientations() -> Int {
return UIInterfaceOrientation.Portrait.rawValue
}



Aucun commentaire:

Enregistrer un commentaire