Get launch orientation of iPad app

后端 未结 9 694
无人及你
无人及你 2020-12-02 16:19

In my iPad app, I need to run some layout code to set the proper layout depending on the orientation. By default, the layout is configured for the landscape orientation, so

9条回答
  •  旧巷少年郎
    2020-12-02 16:44

    Not that you need another answer, but I thought I should add that you almost never want to use [[UIDevice currentDevice] orientation]. That method returns the orientation of the device, which isn't necessarily the same as the orientation of the interface.

提交回复
热议问题