【发布时间】:2011-07-10 01:43:23
【问题描述】:
我收到错误:
*** -[NSArray subarrayWithRange:]: index 9779 beyond bounds [0 .. 9776]'
***
我不知道如何解决它。
如果你能告诉我那就太好了!
NSArray *keys = [NSArray arrayWithObjects:@"type", @"name", @"street", @"address1", @"address2", @"town", @"county", @"postcode", @"number", @"coffee club", @"latitude", @"longitude", nil];
for (int i = 0; i < [chunks count]; i += [keys count])
{
NSArray *subarray = [chunks subarrayWithRange:NSMakeRange(i, [keys count])];
NSDictionary *dict = [[NSDictionary alloc] initWithObjects:subarray forKeys:keys];
NSLog(@"%@", dict);
// do something with dict
[dict release];
}
【问题讨论】:
标签: iphone objective-c xcode ios4 nsarray