zoukankan      html  css  js  c++  java
  • swift -- 单例+ lazy懒加载 + 第三方库

    //工具类单例

        static let goods : NHGoods = {

            let good = NHGoods()

            

            return good

        }()

    //懒加载

    lazy var registerBtn: UIButton = { 

            var btn = UIButton.init(frame: CGRect(x: 100, y:350 , 200, height: 40));

           btn.backgroundColor = UIColor.orange

            btn.setTitle("注册", for: .normal)

            btn.setBackgroundImage(UIImage.init(named: "loginBtnBg"), for: .normal)

            return btn

        }()

    //***** swift  第三方库*****//////////////////////////////////////////

     http://blog.csdn.net/timtian008/article/details/53520896

    #解决键盘弹起遮挡工具

    pod 'IQKeyboardManagerSwift', '~>4.0.6'

    #多种类型弹出框

    pod 'SCLAlertView', :git => 'https://github.com/vikmeup/SCLAlertView-Swift'

    # Alamofire 网络库 (4.1.0最低支持iOS8.0,4.0最低支持iOS9.0)

    pod 'Alamofire', '~> 4.0'

    # swift解析json库

    pod 'SwiftyJSON', :git => 'https://github.com/IBM-Swift/SwiftyJSON.git' #AutoLayout 库 pod "SnapKit"

    #网络图片库

    pod "Kingfisher" # swift编写的各种加密算法,如:MD5,SHA1 pod 'CryptoSwift', :git => 'https://github.com/krzyzanowskim/CryptoSwift.git', :branch => 'swift3'

    # 网络加载图片预处理工具

    pod 'AlamofireImage', '~> 3.0' # swift RSA加密 pod 'SwiftyRSA', :git => 'https://github.com/TakeScoop/SwiftyRSA.git', :branch => 'swift-3.0'

    # 二维码扫描解码及生成二维码

    pod 'SwiftQRCode', :git => 'https://github.com/zhiquan911/SwiftQRCode.git', :branch => 'master'

    # 苹果底层保存密码keychain工具,https://github.com/marketplacer/keychain-swift

    pod 'KeychainSwift', '~> 6.0'

    # websocket库

    pod 'Starscream', :git => 'https://github.com/daltoniam/Starscream.git', :branch => 'swift3'

    # 日志输出管理

    pod 'Log', '~> 1.0'

    # Swfit项目语言本地化支持框架: https://github.com/marmelroy/Localize-Swift

    pod 'Localize-Swift', '~> 1.5'

    #字体图片库

    pod 'FontAwesomeKit.Swift'

    #简单快速灵活的集成类似网易新闻, 头条等带滑块的滚动视图,实现视图联动, 滑块,https://github.com/jasnig/ScrollPageView

    pod 'ScrollPageView', '~> 0.1.4'

  • 相关阅读:
    kubeadm部署k8s v1.18.6版本
    harbor
    kubectl常用命令
    日常运维知识点
    CentOS6.5搭建oracle11g RAC
    linux(mint)下刻录镜像到光盘
    aspectj
    NoSql系列目录
    在线考试系统源码(题库抽题&自动阅卷打分)
    java问卷调查系统源码(java+mysql)
  • 原文地址:https://www.cnblogs.com/daxueshan/p/5588485.html
Copyright © 2011-2022 走看看