noob iPhone "count" frustrations!?!?!
Posted
by codemonkey
on Stack Overflow
See other posts from Stack Overflow
or by codemonkey
Published on 2010-05-26T23:14:49Z
Indexed on
2010/05/26
23:21 UTC
Read the original article
Hit count: 242
iphone
|objective-c
Okay, I know I must be doing something incredibly stupid here. Here's the sample code (which, when executed within a viewDidLoad block silently crashes... no error output to debug console).
NSMutableArray *bs = [NSMutableArray arrayWithCapacity:10];
[bs addObject:[NSNumber numberWithInteger: 2]];
NSLog(@"%@", [bs count]);
[bs release];
What am I missing?
Oh... and in case anyone is wondering, this code is just me trying to figure out why I can't get the count of an NSMutableArray that actually matters somewhere else in the program.
© Stack Overflow or respective owner