#pragma mark - 視圖即將出現
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
self.navigationController.navigationBar.barTintColor = [UIColor whiteColor];
NSDictionary *dic = @{
NSForegroundColorAttributeName:kRGBColor(51, 51, 51),
NSFontAttributeName:[UIFont systemFontOfSize:16 * SCALE_WIDTH]
};
self.navigationController.navigationBar.titleTextAttributes = dic;
//按鈕顏色
self.navigationController.navigationBar.tintColor = kRGBColor(51, 51, 51);
}
#pragma mark - 視圖即將消失
- (void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
self.navigationController.navigationBar.barTintColor = kRGBColor(41, 148, 231);
NSDictionary *dic = @{
NSForegroundColorAttributeName:[UIColor whiteColor],
NSFontAttributeName:[UIFont systemFontOfSize:16 * SCALE_WIDTH]
};
self.navigationController.navigationBar.titleTextAttributes = dic;
//按鈕顏色
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
}
在某個需要改變navi上面控件屬性的vc
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
推薦閱讀更多精彩內容
- Xamarin XAML語言教程構建ControlTemplate控件模板 控件模板ControlTemplate...
- 此時點擊按鈕超出父控件 的部分時 不會響應對應的方法 ,如果想要實現方法... 1.從寫父控件的- (UIView...