我有一个数组NSMutableArray
。它包含来自 XML 文件的对象 - @"time"
. 我需要将所有记录从NSMutableArray
key移动@"time"
到NSArray
. 这是为了表示会根据日历上的日期被高亮标记。我该如何实施?
如果我写代码:
NSDictionary *nItem = [rasp objectAtIndex:0]; //here instead of 0, you should put the number of elements in the array, but I do not get ((
NSArray *data = [NSArray arrayWithObjects:[nItem objectForKey:@"time"], nil];
NSMutableArray
仅分配数组中的第一个日期,索引 0。