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

六.layer.cornerRadius

转载于:https://my.oschina.net/u/587323/blog/3034799

版权声明:本文为weixin_34235457原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_34235457/article/details/92009098