ios - LandScape Orientation on iPhone Not Work Correctly -
recently develop application using swift in xcode 6.3.
application support iphone , ipad in landscape mode (both right , left)
have set
supported interface orientation
in info.plist landscaperight , left ipad,iphone , universal
in ipad work correctly in iphone 1 landscape mode work , dont change when rotating device
add appdelegate
func application(application: uiapplication, supportedinterfaceorientationsforwindow window: uiwindow?) -> int { return int(uiinterfaceorientationmask.landscape.rawvalue) }
but not work
, adding code root viewcontroller
override func shouldautorotate() -> bool { return true } override func supportedinterfaceorientations() -> int { return int(uiinterfaceorientationmask.landscaperight.rawvalue | uiinterfaceorientationmask.landscapeleft.rawvalue) } override func preferredinterfaceorientationforpresentation() -> uiinterfaceorientation { return uiinterfaceorientation.landscaperight }
but dont work either
body know whats going on in iphone?
tnx adv
- in project navigator select project
- tap target in target list
- select "general" tab
you find "landscape left" , "landscape right" checkboxes in deployment info section
Comments
Post a Comment