一.设置tabbar的选中颜色

AppDelegate.swift文件中,增加 UITabBar.appearance().tintColor = UIColor.orange

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 Storyboard

三.CocoaPods的使用

初始化

在项目的根目录使用命令

pod init

导入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 install

or防止更新库

pod install --no-repo-update

04-10 20:58