IOS開發中遇到的問題

一.設置tabbar的選中顏色

AppDelegate.swift文件中,增長 UITabBar.appearance().tintColor = UIColor.orangeios

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        UITabBar.appearance().tintColor = UIColor.orange
        // Override point for customization after application launch.
        return true
    }

二. Storyboard抽離

Editor>Refactor to Storyboardswift

三.CocoaPods的使用

初始化

在項目的根目錄使用命令

pod initapp

導入Alamofire
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'leqiHanZiIOS' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
pod 'Alamofire'
  # Pods for leqiHanZiIOS

end
安裝Alamofire

pod installide

or防止更新庫ui

pod install --no-repo-updatespa

支持http請求

四.Cycle in dependencies between targets 'A組件' and 'B組件'; building could produce unreliable results.

1.Xcode左上角File選項卡下選擇Workspace Settings選項.

2.在彈出框中的第二個選項框中選擇最後一個「Legacy Build System」

五.briage.h

六.layer.cornerRadius

相關文章
相關標籤/搜索