Skip to content

GodL/Association

Repository files navigation

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 .

About

Easier to use oc's Runtime association API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages