您当前的位置: 首页 >  ui

培根芝士

暂无认证

  • 1浏览

    0关注

    446博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

UINavigationController中的Controller响应横竖屏和状态栏修改

培根芝士 发布时间:2014-12-21 14:37:41 ,浏览量:1

#pragma mark - LandScapeUINavigation

@interface UINavigationController (LandScapeUINavigation)

- (BOOL)shouldAutorotate;

@end

@implementation UINavigationController (LandScapeUINavigation)

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

{

    //NSLog(@"Nav shouldAutorotateToInterfaceOrientation");

    return [self.topViewController shouldAutorotateToInterfaceOrientation:interfaceOrientation];

}

- (BOOL)shouldAutorotate

{

    //NSLog(@"Nav shouldAutorotate");

    return YES;

}

- (NSUInteger)supportedInterfaceOrientations

{

    //NSLog(@"Nav supportedInterfaceOrientations:%ld", [self.topViewController supportedInterfaceOrientations]);

    return [self.topViewController supportedInterfaceOrientations];

}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation

{

    //NSLog(@"Nav preferredInterfaceOrientationForPresentation");

    return [self.topViewController preferredInterfaceOrientationForPresentation];

}

- (UIStatusBarStyle)preferredStatusBarStyle {

    return [self.topViewController preferredStatusBarStyle];

}

- (BOOL)prefersStatusBarHidden

{

    return [self.topViewController prefersStatusBarHidden];

}

@end

关注
打赏
1660824269
查看更多评论
立即登录/注册

微信扫码登录

0.0396s