iOS8 Interface Rotation Methods not called

前端 未结 3 2000
别那么骄傲
别那么骄傲 2021-02-01 15:25

Since willAnimateRotationToInterfaceOrientation:duration: is deprecated in iOS8, one needs to use viewWillTransitionToSize:withTransitionCoordinator: i

3条回答
  •  猫巷女王i
    2021-02-01 16:17

    As per the docs, remember to call super

    - (void)viewWillTransitionToSize:(CGSize)size
           withTransitionCoordinator:(id)coordinator {
        [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
    
        // ...
    }
    

    Otherwise child view controllers will not get the message forwarded on to them.

提交回复
热议问题