Cannot rotate interface orientation to portrait upside down

前端 未结 3 935
礼貌的吻别
礼貌的吻别 2021-01-18 10:41

Both on iPhone simulator and iPhone 3GS (iOS 6) I cannot manage to set the orientation to portrait upside down. I have just one ViewController. I\'ve added this code in it:<

3条回答
  •  醉话见心
    2021-01-18 10:48

    I know there's an answer that worked but for anyone else who's still stuck with the same issue:

    I had a similar problem that was connected to Xcode: portrait rotations weren't being supported despite returning YES to - (BOOL) shouldAutorotateToInterfaceOrientation: for all cases. It turned out to be the enabled 'Supported Interface Orientations' in the summary window of my target's project editor:

    enter image description here

    The above 'iPhone/iPad Depoloyment Info' selections weren't doing it, it was the 'iPad Deployment Info' section that appears to control what the simulator will do despite the fact that I was only using the iPhone sim. Once I'd enabled the same orientations in that section then the iPhone simulation worked and I was able to test what happened when the simulator was rotated....

提交回复
热议问题