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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 08-24-2009, 03:11 PM   #8 (permalink)
voiperguy
Registered Member
 
Join Date: Aug 2009
Location: Calgary, AB
Posts: 64
voiperguy is on a distinguished road
Default

Quote:
Originally Posted by ybrikeeg View Post
great tutorial!! I was wondering if there was a way to make a "custom" picker in the sense of having the picker be pink instead of gray. And if there is anything else you can do to customize it.
Took some time, but I figured out how to add billTotal and tipAmount.

- Add a Label to your .xib file (delete the text "Label")
- Add (to your .h file) IBOutlet UILabel *totalAmount;
- In your .m file (below where the PickerView calculates the numbers) add this below "tipAmount.text....bla bla bla"
totalAmount.text = [[NSString stringWithFormat:@"Total: $%.2f", (tipTotal + [billTotal.text floatValue])];

That should be it. Now when you enter a bill amount and scroll the pickerview to the percentage you want to tip it will display the "Tip Amount" (as in the tutorial)... and, it will add the bill amount, tip amount and give you a total amount. Kinda confusing, but it works.
voiperguy is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,172
Threads: 93,916
Posts: 402,132
Top Poster: BrianSlick (7,966)
Welcome to our newest member, myrtaah95
Powered by vBadvanced CMPS v3.1.0

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