TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Mar 2017 |
Maintained by Anton Bukov.
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 :)
orNil is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'orNil'
Anton Bukov, [email protected]
orNil is available under the MIT license. See the LICENSE file for more info.