Skip to content

A NSNotificationCenter Category to utilize block for Objective-C

License

Notifications You must be signed in to change notification settings

deput/NSNotificationCenter-Block

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NSNotificationCenter-Block

A NSNotificationCenter Category to utilize block for Objective-C

Usage

Using this api is exactly the same as using native api exposed in NSNotificationCenter:

[[NSNotificationCenter defaultCenter] addBlockObserver:^(NSNotification *notification) {
        //do your stuff
    } name:UIApplicationDidEnterBackgroundNotification object:nil autoRemove:YES];

Here name,object function as param in -[NSNotificationCenter addObserver:selector:name:object:] the block will be removed automatically if autoRemove set to YES.

About

A NSNotificationCenter Category to utilize block for Objective-C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published