【发布时间】:2017-10-06 11:52:48
【问题描述】:
NSArray* nameArr = [NSArray arrayWithObjects: @"Jill Valentine", @"Peter Griffin", @"Meg Griffin", @"Jack Lolwut",
@"Mike Roflcoptor", @"Cindy Woods", @"Jessica Windmill", @"Alexander The Great",
@"Sarah Peterson", @"Scott Scottland", @"Geoff Fanta", @"Amanda Pope", @"Michael Meyers",
@"Richard Biggus", @"Montey Python", @"Mike Wut", @"Fake Person", @"Chair",@"subbu",@"reddy",@"suresh",@"harish",@"naresh",@"giri",@"nani",
nil];
for (i=0; i<=nameArr.count i++)
{
NSMutableDictionary *dic=[NSMutableDictionary new];
[dic setObject:@"nameArr" forKey:@"name"];
}
【问题讨论】:
-
你想要什么结果?
-
试试这个
[dic setObject:nameArr forKey:@"name"];。不需要使用 for 循环。
标签: ios iphone ios7 ios5 ios-3.x