Skip to content

iOSleep/SafeKeyPath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI Status Version License Platform

inspiration by https://github.com/jspahrsummers/libextobjc

Installation

SafeKeyPath is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SafeKeyPath'

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

For object you can use like this

UIButtn *btn;
// simple
NSString *keyPath1 = KeyPath(btn, state);
// mulit
NSString *keyPath2 = KeyPath(btn, titleLabel, text);

you can also use Class to get keyPath

// simple
NSString *keyPath1 = KeyPath(btn, state);
// mulit
NSString *keyPath2 = KeyPath(btn, titleLabel, text);

Author

iOSleep, mx.yolande@gmail.com

License

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