美文网首页
iOS开发技巧与细节(持续更新)

iOS开发技巧与细节(持续更新)

作者: Sanchain | 来源:发表于2016-09-12 19:36 被阅读36次

    显示与隐藏顶部状态栏

    - (void)viewDidAppear:(BOOL)animated {

    [super viewDidAppear:animated];

    [[UIApplication sharedApplication] setStatusBarHidden:YES];

    }

    - (void)viewWillDisappear:(BOOL)animated {

    [super viewWillDisappear:animated];

    [[UIApplication sharedApplication] setStatusBarHidden:NO];

    }

    2. 显示与隐藏导航栏UINavigationBar

    - (void)viewDidAppear:(BOOL)animated {

    [super viewDidAppear:animated];

    [self.navigationController setNavigationBarHidden:YES animated:YES];

    }

    - (void)viewWillDisappear:(BOOL)animated {

    [super viewWillDisappear:animated];

    [self.navigationController setNavigationBarHidden:NO animated:YES];

    }

    相关文章

      网友评论

          本文标题:iOS开发技巧与细节(持续更新)

          本文链接:https://www.haomeiwen.com/subject/qjnpettx.html