how to combine addObject with Object instantiation?
how to combine addObject with Object instantiation?
- Subject: how to combine addObject with Object instantiation?
- From: Sandy Santra <email@hidden>
- Date: Sun, 03 May 2009 15:53:07 -0400
After
NSMutableArray *myArray = [NSMutableArray array];
Is there any way to combine these two lines:
NSString *myName = @"Joe"; [myArray addObject:myName];
into one line?
I keep thinking there's a way to use
[myArray addObject:[instantiation of some object]];
to add all types of objects to a mutable array, but can't seem to figure out how to combine statements.
Thanks!
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden