iOS:WillAnimateRotationInterfaceOrientation即使使用shouldAutorotateToInterfaceOrientation也不会被调用
我有 及 但在我的日志中,“hello there”从未出现过,即使“shouldRotate”出现过 我的设置是这样的,我有一个TabBarController,里面有4个常规视图控制器。特别是这个选项卡里面有一个WebView。当我改变方向时,什么也没发生 我应该在AppDelegate级别做些什么吗iOS:WillAnimateRotationInterfaceOrientation即使使用shouldAutorotateToInterfaceOrientation也不会被调用,ios,uiwebview,uitabbarcontroller,orientation,screen-orientation,Ios,Uiwebview,Uitabbarcontroller,Orientation,Screen Orientation,我有 及 但在我的日志中,“hello there”从未出现过,即使“shouldRotate”出现过 我的设置是这样的,我有一个TabBarController,里面有4个常规视图控制器。特别是这个选项卡里面有一个WebView。当我改变方向时,什么也没发生 我应该在AppDelegate级别做些什么吗 有人能帮我理解发生了什么吗?如果要使用TabBarController设置旋转动画,所有选项卡栏上的ViewController都应该为支持的方向返回YES shouldAutorotateT
有人能帮我理解发生了什么吗?如果要使用TabBarController设置旋转动画,所有选项卡栏上的ViewController都应该为支持的方向返回YES
shouldAutorotateToInterfaceOrientation正是您可以配置此设置的位置。在其他3个视图控制器的
shouldAutorotateToInterfaceOrientation:
中,您会返回什么
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
NSLog(@"shouldRotate");
return YES;
}
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration {
NSLog(@"Hello there");
[self.webpage setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
}