KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've looked everywhere for this, online, on stack overflow and cannot still work out what I'm doing wrong. I'm trying to add an element to an existing NSMutableArray. But it crashes on line 4: -[__NSArrayI addObject:]: unrecognized selector sent to instance 0x897b320 The code: NSMutableArray *mystr = [[NSMutableArray alloc] init]; mystr = [NSArray arrayWithObjects:@"hello",@"world",@"etc",nil]; NSString *obj = @"hiagain"; [mystr addObject:obj]; What am I doing wrong? This is driving me crazy!!!
Tags (comma-separated)
Save Edits
Cancel