Latest 0.1.1
Homepage https://github.com/515783034/weak_Delegates
License MIT
Platforms ios 9.0
Authors

how to create delegates with "weak"? 中文介绍

weak_Delegates

  • how to use?

    /// 初始化, 泛型传入代理类型
    var delegates = WeakArray<someProtocol>()
    
    // 添加
    delegates.add(someProtocol1)
    
    // 移除
    delegates.remove(someProtocol2)
    
    // 触发代理
    delegates.excute(block)      // block: ((someProtocol?)->)
  • Installation

    CocoaPods
    pod 'weak_Delegates', '~> 0.1.0'
    Carthage
    github "515783034/weak_Delegates" ~> 0.1.0

Latest podspec

{
    "name": "weak_Delegates",
    "version": "0.1.1",
    "summary": "how to create delegates with `weak`",
    "description": "This is a solution to use weak array.",
    "source": {
        "git": "https://github.com/515783034/weak_Delegates.git",
        "tag": "0.1.1"
    },
    "source_files": "weak_Delegates/Sources/*.swift",
    "homepage": "https://github.com/515783034/weak_Delegates",
    "screenshots": "http://upload-images.jianshu.io/upload_images/988961-e4f2b08ed4f1f430.gif?imageMogr2/auto-orient/strip",
    "license": "MIT",
    "platforms": {
        "ios": "9.0"
    },
    "authors": {
        "shmily": "[email protected]"
    },
    "social_media_url": "http://www.jianshu.com/u/3095a094665c",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This