【发布时间】:2013-04-15 10:52:55
【问题描述】:
我想将对象从 2 NSArray 添加到 NSMutableArray。我不知道这个。
这是我的代码:
@interface ViewController : UITableViewController
{
NSArray *animal;
NSArray *color;
NSMutableArray *all;
}
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
animal = [[NSArray alloc]initWithObjects:@"Lion",@"Tiger",@"Dog",@"Cat",@"Sheep",@"Wolf", nil];
color = [[NSArray alloc]initWithObjects:@"Blue",@"Red",@"Yellow",@"Green",@"Black", nil];
all = ??? ; //how to add object from animal and color array in all
}
【问题讨论】:
标签: ios objective-c nsmutablearray nsarray