Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 964 Bytes

README.md

File metadata and controls

34 lines (25 loc) · 964 Bytes

Association

Easier to use oc's Runtime association API

Usage

extension UIView {
    public var myColor: UIColor {
        set {
            self.associationObject["myColor"] = newValue
        }
        get {
            self.associationObject["myColor"]
        }
    }
}

Installation

Using the Swift Package Manager Add Association as a dependency to your Package.swift file. For more information, see the Swift Package Manager documentation.

.package(url: "https://github.com/GodL/Association.git", from: "1.0.0")

Help & Feedback

  • Open an issue if you need help, if you found a bug, or if you want to discuss a feature request.
  • Open a PR if you want to make some change to Association.
  • Contact @GodL .