cocoa-touch
How does -performSelector:withObject:afterDelay: work?
From the docs: Invokes a method of the receiver on the current thread using the default mode after a delay. The discussion goes further: This method sets up a timer to perform the aSelector message on the current thread’s run loop. The timer is configured to run in the default mode (NSDefaultRunLoopMode). When the timer … Read more
How do I find out if I need to retain or assign an property?
Assign is for primitive values like BOOL, NSInteger or double. For objects use retain or copy, depending on if you want to keep a reference to the original object or make a copy of it. The only common exception is weak references, where you want to keep a pointer to an object but can’t retain … Read more
Subtract objects in one NSArray from another array
Something like this? NSMutableArray *array = [NSMutableArray arrayWithArray:wants]; [array removeObjectsInArray:needs];
When does an associated object get released?
Even larger than your -dealloc issue is this: UIKit is not KVO-compliant No effort has been made to make UIKit classes key-value observable. If any of them are, it is entirely coincidental and is subject to break at Apple’s whim. And yes, I work for Apple on the UIKit framework. This means that you’re going … Read more