作品分享
问答交流
发现
任务
客服工单
- (void)viewWillAppearBOOL)animated { [super viewWillAppear:animated]; [self.navigationController setNavigationBarHidden:true animated:animated]; } - (void)viewWillDisappearBOOL)animated { [super viewWillDisappear:animated]; [self.navigationController setNavigationBarHidden:false animated:animated]; }
@property (nonatomic, copy) void(^viewWillAppearNavigationBarHandler)(BOOL animated); - (void)viewWillAppearBOOL)animated { [super viewWillAppear:animated]; if (self.viewWillAppearNavigationBarHandler) { self.viewWillAppearNavigationBarHandler(animated); } else { [self.navigationController setNavigationBarHidden:NO animated:animated]; } }
- (void)viewDidLoad { [super viewDidLoad]; __weak typeof(self) weakSelf =self; self.viewWillAppearNavigationBarHandler = ^(BOOL animated) { [weakSelf.navigationController setNavigationBarHidden:YES animated:animated]; }; }
举报
Powered by CangBaoKu v1.0 小黑屋藏宝库It社区( 冀ICP备14008649号 )
GMT+8, 2024-11-24 05:10, Processed in 0.136612 second(s), 32 queries.© 2003-2025 cbk Team.