IOS开发中遇到的问题

一.设置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

支持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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容