cocoa - Problem removing multiple objects from NSMutableArray iPhone SDK -


I'm having trouble extracting objects from the nsmutable array here it is.

  NSURL * url = [NSURL URLWithString: @ "http://www.lockerz.com/dailies"]]; NSDTA * DataData = [NSDTATA DataWith Content of URL: URL]; NSString * removeForArray = [[NSString alloc] initWithData: Data Encoding: NSASCIIStringEncoding]; NSArray * theArray = [Separate String from removeForArray Components: @ ""]; NSMutableArray * deArray = [[NSMutableArray array] initWithArray: theArray]; [DeArray Deleted Objects: NSMKrange (0, 40)]; NSLog (@ "% @", Darey);  

+ [NSMutableArray array] is already an initial Returns the array. Do not use an initial method on it, they are used on new examples that you can call alloc .

In this case you

  • Inoc / li>

Three of the following lines are equivalent:

  NSMutableArray * a = [[ARRA Miptype Cop] AutoCare]; NSMutableArray * b = [NSMutableArray arrayWithArray: theArray]; NSMutableArray * c = [[[NSMutableArray alloc] initWithArray: theArray] autorelease];  

Comments