Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (i=0; i<json.count; i++) {
- NSDictionary *bodyDictionary = [json objectAtIndex:i];
- NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
- [formatter setTimeZone:[NSTimeZone timeZoneWithName:@"GMT"]];
- [formatter setLocale:[NSLocale currentLocale]];
- [formatter setDateFormat:@"yyyy-mm-dd HH:mm:ss"];
- NSDate *date = [formatter dateFromString:[bodyDictionary objectForKey:@"date"]];
- NSNumber* thisVolume = [NSNumber numberWithInteger:[[bodyDictionary objectForKey:@"volume"] integerValue]];
- NSTimeInterval timeNumber = [date timeIntervalSince1970];
- CGPoint point = CGPointMake(timeNumber, thisVolume.doubleValue);
- NSValue *pointValue = [NSValue valueWithCGPoint:point];
- [dataArray addObject:pointValue];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement