The Dangling Pointer
  • Home
  • About
Sign in Subscribe

objective-c

A collection of 2 posts
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
ios

iOS Basics: nil vs NULL vs NSNull

Yes, there are three ways to represent a null value in Objective-C. NULL = Absence of a value with C-style pointers nil = Absence of value with Objective-C object variables NSNull = A nil boxed as an object for storage in a collection If you try adding nil to a NSDictionary or NSArray,
23 Nov 2011 1 min read
Page 1 of 1
The Dangling Pointer © 2025
  • Sign up
Powered by Ghost