//存入
1 for (NSDictionary *dic in self.lrcList) { 2 3 int i = 0; 4 5 NSString *timeStr = [dic objectForKey:@"lrctime"]; 6 7 NSArray *array = [timeStr componentsSeparatedByString:@":"];//把时间转换成秒 8 9 float currentTime = [array[0] floatValue] * 60 + [array[1] floatValue]; 10 11 NSNumber *number = [NSNumber numberWithFloat:currentTime]; 12 13 //[timearray addObject:number]; 14 15 timearray[i]=number; 16 17 i++; 18 19 }
//取出
1 [[timearray objectAtIndex:_numberOfLrc] floatValue]