PropertyExtensions 1.0.5

PropertyExtensions 1.0.5

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Feb 2016
SPMSupports SPM

Maintained by Brad Hilton.



  • By
  • Brad Hilton

PropertyExtensions

PropertyExtensions allows you to easily add stored properties in class extensions:

extension UIView : PropertyExtensions {
  var identifier: String {
    get {
      return getProperty("identifier", initial: "Unknown")
    }
    set {
      setValue(newValue, forProperty: "identifier")
    }
  }
}

Enjoy!

Installation

PropertyExtensions is available through CocoaPods. To install, simply include the following lines in your podfile:

use_frameworks!
pod 'PropertyExtensions'

Be sure to import the module at the top of your .swift files:

import PropertyExtensions

Alternatively, clone this repo or download it as a zip and include the classes in your project.

Author

Brad Hilton, [email protected]

License

PropertyExtensions is available under the MIT license. See the LICENSE file for more info.