code here :
NSString *str = @"1.22222222";
double d = [str doubleValue];
arrForDoubleValue = [[NSMutableArray alloc] init];
[arrForDoubleValue addObject:[NSNumber numberWithDouble:d]];
for(int i = 0; i<[arrForDoubleValue count];i++)
{
double a = [[arrForDoubleValue objectAtIndex:i]doubleValue];
NSLog(@"%.8lf",a);
}
No comments:
Post a Comment