我想将对象从 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
}