// 圖標,啟動圖片,拖入圖片資源 //名稱,版本,支持的方向,系統的版本 info.plist Bundle display name; Bundle versions string , short; Supported interface orientations;(三個方向) 項目-TARGETS-General - 8.0以上
//pch文件 創建:iOS-Other-PCH.file //直接拖入已寫好的 配置:項目-TARGETS-Build Setting - All - Prefix - Prefix Header - 雙擊添加相對路徑 ./項目名稱/pch文件名.pch;
// // PrefixHeader.pch // // Created by Apple on 14/6/13. // Copyright ? 2014年 zhouyu. All rights reserved. // #ifndef PrefixHeader_pch #define PrefixHeader_pch // 如果當前是OC的代碼就用下面的這些東西 // 主要是屏蔽c文件 # ifdef __OBJC__ #define JDGUITextFieldHeight 40.0 #define KUIScreenSize [UIScreen mainScreen].bounds.size #define KUIScreenWidth [UIScreen mainScreen].bounds.size.width #define KUIScreenHeight [UIScreen mainScreen].bounds.size.height #define BackGroundColor(R,G,B) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:1.0] // 自定義輸入日志 Log #ifdef DEBUG // 如果當前是開發 調試階段可以用ZYLog輸入 #define ZYLog(...) NSLog(__VA_ARGS__) #else // 發布後就不能輸入了 #define ZYLog(...) #endif #endif #endif /* PrefixHeader_pch */
刪除LaunchScreen.storyboard
設置啟動圖標和APP圖片
包括訪問 相冊/相機/麥克風/通訊錄 iOS 10不設置,使用相關功能APP會發生崩潰
還有藍牙,日歷,健康,地圖定位等等
刪除不必要文件
AppDelegate<喎?/kf/ware/vc/" target="_blank" class="keylink">vcD4NCjxwcmUgY2xhc3M9"brush:java;"> #import "AppDelegate.h" #import "TabBarController.h" @interface AppDelegate () @end @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; // 2.設置為窗口的跟控制器 // if ([self isNewVersion]) { // // self.window.rootViewController = [[GuideController alloc] init]; // } else { self.window.rootViewController = [[TabBarController alloc] init]; // } [self.window makeKeyAndVisible]; return YES; }
根據功能搭建架構
打開終端cd 切換到當前項目路徑
pod init
打開Podfile文件修改內容
platform :ios, ‘8.0’ #項目名稱(英文名稱),替換成項目名稱 target '項目名稱(英文名稱)' do pod 'Masonry' pod 'AFNetworking' pod 'SDWebImage' pod 'SVProgressHUD' pod 'Bugly' end
//安裝第三方庫 pod install
初次安裝比較費時
安裝成功
解決方案:運行 gem install cocoapods 更新cocoapods工具,然後再執行pod install
xxxxx$ gem install cocoapods Fetching: nap-1.0.0.gem (100%) Successfully installed nap-1.0.0 Fetching: molinillo-0.4.0.gem (100%) Successfully installed molinillo-0.4.0 Fetching: cocoapods-trunk-0.6.4.gem (100%) Successfully installed cocoapods-trunk-0.6.4 Fetching: cocoapods-try-0.5.1.gem (100%) Successfully installed cocoapods-try-0.5.1 Fetching: cocoapods-stats-0.6.2.gem (100%) Successfully installed cocoapods-stats-0.6.2 Fetching: cocoapods-search-0.1.0.gem (100%) Successfully installed cocoapods-search-0.1.0 Fetching: cocoapods-downloader-0.9.3.gem (100%) Successfully installed cocoapods-downloader-0.9.3 Fetching: cocoapods-core-0.39.0.gem (100%) Successfully installed cocoapods-core-0.39.0 Fetching: cocoapods-0.39.0.gem (100%) Successfully installed cocoapods-0.39.0 Parsing documentation for nap-1.0.0 Installing ri documentation for nap-1.0.0 Parsing documentation for molinillo-0.4.0 Installing ri documentation for molinillo-0.4.0 Parsing documentation for cocoapods-trunk-0.6.4 Installing ri documentation for cocoapods-trunk-0.6.4 Parsing documentation for cocoapods-try-0.5.1 Installing ri documentation for cocoapods-try-0.5.1 Parsing documentation for cocoapods-stats-0.6.2 Installing ri documentation for cocoapods-stats-0.6.2 Parsing documentation for cocoapods-search-0.1.0 Installing ri documentation for cocoapods-search-0.1.0 Parsing documentation for cocoapods-downloader-0.9.3 Installing ri documentation for cocoapods-downloader-0.9.3 Parsing documentation for cocoapods-core-0.39.0 Installing ri documentation for cocoapods-core-0.39.0 Parsing documentation for cocoapods-0.39.0 Installing ri documentation for cocoapods-0.39.0 9 gems installed xxxxx$ pod install Updating local specs repositories Analyzing dependencies Downloading dependencies Installing AFNetworking (2.5.4) Installing DACircularProgress (2.3.1) Installing FMDB (2.5) Installing GCJSONKit (1.5.0) Installing IQKeyboardManager (3.2.0.3) Installing MBProgressHUD (0.9.1) Installing MWPhotoBrowser (1.4.1) Installing MarqueeLabel (2.0.10) Installing NJKScrollFullScreen (0.2.6) Installing PSTCollectionView (1.2.3) Installing SDWebImage (3.7.3) Installing SSKeychain (1.2.3) Installing TOWebViewController (2.0.19) Installing TTTAttributedLabel (1.10.1) Installing UICountingLabel (1.1.0) Installing UMeng (2.2.1) Installing UMengSocial (4.3) Installing XYPieChart (0.2) Generating Pods project Integrating client project [!] Please close any current Xcode sessions and use `xxx.xcworkspace` for this project from now on. Sending stats Pod installation complete! There are 14 dependencies from the Podfile and 18 total pods installed. xxxxx$