国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

iOS設置導航與其標題的顏色及字體大小和系統默認TabBar的相關設置與使用方法

2019-11-14 19:18:21
字體:
來源:轉載
供稿:網友

第一步:

//在info.plist中添加一個字段:view controller -base status bar 設置為NO;//導航顏色[[UINavigationBar appearance] setBarTintColor:[UIColor XXXX]];[[UITableViewCell appearance] setBackgroundColor:[UIColor XXXX]];//設置狀態欄(信號區)白色[[UIapplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];//默認帶有一定透明效果,可以使用以下方法去除系統效果[navigationController.navigationBar setTranslucent:NO];//更改導航標題字體大小與顏色要在第一級頁面設置 如下// 設置導航默認標題的顏色及字體大小self.navigationController.navigationBar.titleTextAttributes = @{UITextAttributeTextColor: [UIColor whiteColor], UITextAttributeFont:[UIFont boldSystemFontOfSize:18]};

 

第二步:

//UIImageRenderingModeAlwaysOriginal 讓圖片表現的模式為圖片的原始樣式 用于去掉系統添加的顏色self.tabBarController.tabBarItem.title = @"title";if ([[UIDevice currentDevice] systemVersion].floatValue >= 7.0) {[self.tabBarController.tabBarItem setFinishedSelectedImage:[[UIImage imageNamed:@"Image.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] withFinishedUnselectedImage:[[UIImage imageNamed:@"ImageS.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];}else{[self.tabBarController.tabBarItem setFinishedSelectedImage:[UIImage imageNamed:@"Image.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"ImageS.png"]];}//tabbar顏色 用于更改字體顏色[self.tabBarController.tabBar setTintColor:[UIColor XXXX]];

 

 Demo地址:

https://github.com/wly314/HappyTravel

歡迎交流。


上一篇:layer和3D仿射變換

下一篇:iOS內存管理

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 凤台县| 右玉县| 东台市| 安远县| 河池市| 瓦房店市| 寻乌县| 玛纳斯县| 武强县| 汉阴县| 崇明县| 桐城市| 运城市| 礼泉县| 宜良县| 彭州市| 大新县| 临桂县| 南郑县| 榆社县| 西乌| 泾阳县| 饶河县| 澄江县| 德昌县| 合江县| 定结县| 灌云县| 灌南县| 鹤庆县| 霍邱县| 毕节市| 离岛区| 马公市| 壤塘县| 上栗县| 麟游县| 三门峡市| 兰溪市| 新兴县| 博湖县|