前言
在創(chuàng)建項(xiàng)目的時(shí)候需要做很多的配置項(xiàng),因此小記一下,整理在一起方便查閱.
關(guān)閉https網(wǎng)絡(luò)訪問限制
-
info.plist文件中添加App Transport Security Settings - 在該選項(xiàng)下添加
Allow Arbitrary Loads選項(xiàng),值為YES,忽略強(qiáng)制https訪問的限制.
ios 10各種權(quán)限的申請(qǐng)
info.plist添加對(duì)應(yīng)文字描述
- 相冊(cè):
NSPhotoLibraryUsageDescription - 相機(jī):
NSCameraUsageDescription - 麥克風(fēng):
NSMicrophoneUsageDescription - 定位權(quán)限:
NSLocationUsageDescriptio NSLocationWhenInUseUsageDescription NSLocationAlwaysUsageDescription - 日歷:
NSCalendarsUsageDescription - 提醒事項(xiàng):
NSRemindersUsageDescription - 運(yùn)動(dòng)與健身:
NSMotionUsageDescription - 健康更新:
NSHealthUpdateUsageDescription - 健康分享:
NSHealthShareUsageDescription - 藍(lán)牙:
NSBluetoothPeripheralUsageDescription - 媒體資料庫(kù)
NSAppleMusicUsageDescription - 通訊錄
NSContactsUsageDescription
訪問圖庫(kù)或者使用UIImagePickerController的時(shí)候顯示為英文
info.plist添加Localizations,添加item值為
Chinese (simplified)
關(guān)閉xcode 8系統(tǒng)日志的輸出
打開菜單 Product -> Scheme -> Edit Scheme -> Environment Varibales 添加字段OS_ACTIVITY_MODE 并將屬性值設(shè)置為 disable

圖片.png
設(shè)置狀態(tài)欄顏色
info.plist中添加View controller-based status bar appearance,值為NO
程序加載完成后設(shè)置
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
導(dǎo)航器相關(guān)設(shè)置
//設(shè)置圖片背景
[self.nav.navigationBar setBackgroundImage:[UIImage imageNamed:@"nav_bg.png"] forBarMetrics:UIBarMetricsDefault];
//設(shè)置title文字顏色
[self.nav.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName,nil]];