stupid things I will probably do again
An ongoing series.
NSStringhas anintValuemethod and alongLongValuemethod, but it doesn't have alongValuemethod.NSValuehas alongValuemethod, which means that this will throw an exception at runtime rather than being flagged by the compiler:
NSArray *items = [aString componentsSeparatedByString:aSeparator];
long value = [items[0] longValue];
stupid things I will probably forget again
You can add a gesture recognizer to a
UIImageView, but it won't do anything until you setuserInteractionEnabledon.NSStringhas adataUsingEncoding:method, butNSDatadoesn't have astringUsingEncoding:method. You have to use[[NSString alloc] initWithData:encoding:.[tableView indexPathForCell:cell]might work some of the time.
[tableView indexPathForRowAtPoint:cell.center]will work all of the time.