orNil 0.1.3

orNil 0.1.3

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Mar 2017

Maintained by Anton Bukov.



orNil 0.1.3

Usage

Just replace all this boilerplace:

if ([self.delegate respondToSelector:@selector(photoController:didPhoto:)]) {
    [self.delegate photoController:self didPhoto:photo];
}

with tiny property orNil, working on all NSObject subclasses:

[self.delegate.orNil photoController:self didPhoto:photo];

If object not responds to selector, nil will be used as target for this selector :)

Installation

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

pod 'orNil'

Author

Anton Bukov, [email protected]

License

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