How to create block for addObserverForName:object:queue:usin

I have no idea because the books only show ways to create block with one parameters group together while this new method has many separate parameters.

One example might look like this:

NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];

[nc addObserverForName:SomeNotificationName
    usingBlock:^(NSNotification *note) {
        NSLog(@"Something happened and posted notification: %@",note);
1 Like