Skip to content

n-b/PerformIfResponds

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

A performIfResponds proxy for NSObject. Never use -respondsToSelector again.

For example, this:

if([self.delegate respondsToSelector:@selector(fooForBar:]) {
	foo = [self.delegate fooForBar:self]:
}

becomes this:

foo = [[self.delegate performOrReturn:nil] fooForBar:self]:

See bou.io/PerformIfResponds for more details.

About

Never use respondsToSelector: anymore!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published