
Untitled
By: a guest on
Jun 21st, 2012 | syntax:
None | size: 1.11 KB | hits: 6 | expires: Never
How Can I Edit My Array's For Loop To Reflrect This?
pickerArray = [[NSMutableArray alloc] initWithCapacity:700];
for ( int i = 1 ; i <= 1000 ; i = i++)
[pickerArray addObject:[NSString stringWithFormat:@"%i", i]]
float weight = [[pickerArray objectAtIndex:row] intValue];
label.text = [NSString stringWithFormat:@"%f lb", weight];
pickerArray = [[NSMutableArray alloc] initWithCapacity:700];
for ( float i = 0.0 ; i <= 1000.0 ; i = i + 2.5)
{
//[pickerArray addObject:[NSString stringWithFormat:@"%.1f", i]]
[pickerArray addObject:[NSNumber numberWithFloat:i];
}
float weight = [[pickerArray objectAtIndex:row] floatValue];
label.text = [NSString stringWithFormat:@"%.1f", weight];
for ( float f = 0; f <= 1000; f = f + 2.5 )
[pickerArray adObject:[NSString stringWithFormat:@"%.1f", f]];
[pickerArray adObject:[NSString stringWithFormat:@"%.1f", 2.5*i]];
float weight = [[pickerArray objectAtIndex:row] floatValue];
pickerArray = [[NSMutableArray alloc] initWithCapacity:1001];
for ( int i = 0 ; i <= 1000 ; ++i)
[pickerArray addObject:[NSString stringWithFormat:@"%.1f", 2.5*i]]