我有一个 iPhone 应用程序,我试图在其中添加两个可变数组。
NSMutableArray *dataArray = [[NSMutableArray alloc] init];
NSMutableArray *dataArray1 = [[NSMutableArray alloc] init];
NSDictionary *news = [dict objectForKey:@"news"];
NSDictionary *deals = [dict objectForKey:@"deals"];
NSLog(@"%@", [news classForCoder]);
NSLog(@"%@", news);
for (NSDictionary *key in news)
{
if ([key isKindOfClass:[NSDictionary class]])
{
[dataArray addObject:key];
}
}
for (NSDictionary *key in deals)
{
if ([key isKindOfClass:[NSDictionary class]])
{
[dataArray1 addObject:key];
}
}
self.newssarray = dataArray;
[self.mTableView reloadData];
在这里,我想将两个数组“dataArray”和“dataArray2”添加到一个数组中(self.newsarray
)。任何人都可以帮助我实现这一目标吗?