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 02-07-2009, 08:01 PM   #1 (permalink)
imntacrook
Registered Member
 
Join Date: Sep 2008
Age: 67
Posts: 112
Default Easy question about formatting

In my .h file I have:

.h
float percent;

My placeholder in the NSTstringWithFormat etc. is %.2f as below:

.m

NSLog([NSString stringWithFormat:@"Percent = %.2f", percent]);

And all I get is zero's after the decimal point in my log.
I've tried many combinations but nothing seems to work.

Thanks in advance.
imntacrook is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,835
Threads: 89,209
Posts: 380,642
Top Poster: BrianSlick (7,129)
Welcome to our newest member, Aubrey69
Powered by vBadvanced CMPS v3.1.0

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