Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-10-2009, 01:57 PM   #1 (permalink)
Glnn
Registered Member
 
Glnn's Avatar
 
Join Date: Jun 2009
Location: Netherlands
Posts: 31
Default double -> string formatting

I'm having trouble formatting a double to a string..

This is the code is use..

Code:
secondLabel.text = [NSString stringWithFormat:@"%i.%i", second, millisecond];

NSString *convert = [NSString stringWithFormat:@"%i.%i", second, millisecond];
kilometers = [convert doubleValue];
kilometers = kilometers * 2.9;
meterLabel.text = [NSString stringWithFormat:@"%d", kilometers];
and this is the result..



Anybody?
Glnn is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,746
Threads: 89,201
Posts: 380,567
Top Poster: BrianSlick (7,129)
Welcome to our newest member, raKinesic
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:07 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.