留着吧 以后或许有用:
|
- (BOOL)shouldAutorotate { NSLog(@"yyyyshouldAutorotate%i",isVideoPlaying);
if (!self.viewStatus) { _viewStatus = [[UIView alloc]initWithFrame:CGRectMake(0, -20, self.view.frame.size.width, 64)]; } if (![self.navigationBar.subviews containsObject:_viewStatus]) {
UIImageView * img = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 40)];
img.backgroundColor = NAVIGATIONBAR_COLOR; img.alpha = 0.92; [_viewStatus addSubview:img]; [self.navigationBar addSubview:_viewStatus]; [self.navigationBar sendSubviewToBack:_viewStatus]; _viewStatus.backgroundColor = [UIColor whiteColor];
} CGRect frame = self.navigationBar.frame; frame.origin.y = 20; frame.size.height = 44; self.navigationBar.frame = frame; if (isVideoPlaying) { [self.navigationBar setTransform:CGAffineTransformMakeTranslation(0, 0)]; return YES;
}else{
return [[UIDevice currentDevice] orientation] == UIInterfaceOrientationPortrait; } } |
本文讨论了如何根据视频播放状态调整用户界面,并在不同旋转状态下优化导航栏显示,确保用户体验的一致性和功能性。
1812

被折叠的 条评论
为什么被折叠?



