🚼 An object association helper for Swift extensions.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ObjectAssociation
Sample
.gitignore
.swift-version
LICENSE.md
ObjectAssociation.podspec
README.adoc

README.adoc

Meet ObjectAssociation

ObjectAssociation

Author EMail MIT
Version Platforms Swift
Build Passing Cocoapods Carthage SPM

🏵 Introduction

ObjectAssociation is an object association helper for Swift extensions.

📋 Requirements

Type Requirement

Platform

iOS

8.0+

macOS

10.10

tvOS

9.0

watchOS

2.0

Linux

N/A

IDE

Xcode

9.3+

Language

Swift

4.1+

📲 Installation

CocoaPods

ObjectAssociation is available on CocoaPods.

use_frameworks!
pod 'ObjectAssociation'

Manually

Copy all files in the ObjectAssociation directory into your project.

🛌 Dependency

N/A

❤️ Contribution

You are welcome to fork and submit pull requests.

🔖 License

ObjectAssociation is open-sourced software, licensed under the MIT license.

🔫 Usage

import ObjectAssociation

extension NSObject {

  private static let association = ObjectAssociation<String>()

  public var uniqueIdentifier: String? {
    get {
      return NSObject.association[self]
    }
    set {
      NSObject.association[self] = newValue
    }
  }
}