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'

  • 相关阅读:
    [No0000188][VCB-Studio 科普教程 2.5] 基于 PotPlayer 和 madVR 的播放器教程(已更新 XySubFilter)
    [No0000184]JAVA语言学校的危险性
    [No0000185]Java技术板块图
    [No0000187]可能是把Java内存区域讲的最清楚的一篇文章
    [No0000183]Parallel Programming with .NET-How PLINQ processes an IEnumerable<T> on multiple cores
    [No0000182]Parallel Programming with .NET-Partitioning in PLINQ
    [No0000179]改善C#程序的建议2:C#中dynamic的正确用法
    [No0000178]改善C#程序的建议1:非用ICloneable不可的理由
    [No0000181]改善C#程序的建议9:使用Task代替ThreadPool和Thread
    [No000017E]改善C#程序的建议7:正确停止线程
  • 原文地址:https://www.cnblogs.com/daxueshan/p/5588485.html
Copyright © 2011-2022 走看看