作品分享
问答交流
发现
任务
客服工单
- (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-22 04:42, Processed in 0.163196 second(s), 33 queries.© 2003-2025 cbk Team.