The Dangling Pointer
  • Home
  • About
Sign in Subscribe

blocks

A collection of 1 post
blocks

NSNotificationCenter Block-based Observer

Back in iOS 4, a nifty block-based observer method was added to NSNotificationCenter: * (id)addObserverForName:(NSString *)name object:(id)obj queue:(NSOperationQueue *)queue usingBlock:(void (^)(NSNotification *))block; Super convenient, right? I love using blocks to pass simple callbacks to controllers instead of creating a delegate protocol. There is a catch
17 Dec 2013 1 min read
Page 1 of 1
The Dangling Pointer © 2025
  • Sign up
Powered by Ghost