旋转问题
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
1. shouldAutorotateToInterfaceOrientation的调用
a. 子viewcontroller中的shouldAutorotateToInterfaceOrientation只在初始化时调用一次,并且感觉没什么用。
假设 root viewcontroller的shouldAutorotateToInterfaceOrientation支持为all
子viewcontroller的shouldAutorotateToInterfaceOrientation支持为UIInterfaceOrientationIsPortrait
结果 子viewcontroller 将在 4个方向上旋转
b. root viewcontroller中的shouldAutorotateToInterfaceOrientation,在屏幕旋转时总会调用。
2. willRotateToInterfaceOrientation
只会在root shouldAutorotateToInterfaceOrientation支持的方向上调用,willRotateToInterfaceOrientation;