swfit常用第三方庫(kù)

1. 布局框架

  • SnapKit(類似于oc的Masonry)
  • SBLayout(類似于oc的AutoLayout)
  • 使用
    1.cocopods導(dǎo)入
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'SnapKit', '~> 4.0.0'
end
pod install

2.導(dǎo)入類庫(kù)

import SnapKit

class MyViewController: UIViewController {

    lazy var box = UIView()

    override func viewDidLoad() {
        super.viewDidLoad()

        self.view.addSubview(box)
        box.snp.makeConstraints { (make) -> Void in
           make.width.height.equalTo(50)
           make.center.equalTo(self.view)
        }
    }

}

2.Hero(視圖控制器轉(zhuǎn)換)

  • github地址
  • Hero 是一個(gè)建立 iOS 視圖控制器轉(zhuǎn)換的庫(kù),它在 UIKit 繁瑣的轉(zhuǎn)換 API 之上提供了一個(gè)聲明層 - 為開發(fā)人員提供了一個(gè)簡(jiǎn)單的任務(wù)。

3.ViewAnimator(構(gòu)建UIView動(dòng)畫)

  • github地址
  • UITableView, UICollectionView and UIStackView 需要查看Demo
pod "ViewAnimator"

let animation = AnimationType.from(direction: .top, offset: 30.0)
view.animate(animations: [animation])

4.SpreadsheetView(電子表格視圖)

5.圖片加載緩存

6.font, color

  • Hue (集成color功用的庫(kù),使用的是hex顏色值)

7. json解析

8.網(wǎng)絡(luò)

  • Alamofire (http網(wǎng)絡(luò)請(qǐng)求事件處理的框架)
  • Moya (基于Alamofire的更高層網(wǎng)絡(luò)請(qǐng)求封裝抽象層)
  • Reachability (用來檢查應(yīng)用當(dāng)前的網(wǎng)絡(luò)連接狀況)
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容