what method will called when we start to rotate device and after it finished

后端 未结 5 740
抹茶落季
抹茶落季 2021-02-01 16:54

i want to detect a rotation process on ipad programmatically. In this case i want to set a boolean into yes, when the rotation will begin, and set it false after the rotation di

5条回答
  •  再見小時候
    2021-02-01 17:09

    In the UISplitViewController protocol, the new method for iOS8 is

    - (void)splitViewController:(UISplitViewController *)svc willChangeToDisplayMode:(UISplitViewControllerDisplayMode)displayMode
    

    There are four display modes:

    typedef enum UISplitViewControllerDisplayMode : NSInteger {
      UISplitViewControllerDisplayModeAutomatic,
      UISplitViewControllerDisplayModePrimaryHidden,
      UISplitViewControllerDisplayModeAllVisible,
      UISplitViewControllerDisplayModePrimaryOverlay,
    } UISplitViewControllerDisplayMode;
    

    BUT this method will NEVER return Automatic.

提交回复
热议问题