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

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

Draw This
($0.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 08-09-2009, 02:11 PM   #3 (permalink)
Frankie
Registered Member
 
Frankie's Avatar
 
Join Date: Jun 2009
Location: San Antonio, TX
Posts: 104
Frankie is on a distinguished road
Send a message via MSN to Frankie
Default

Quote:
Originally Posted by rdominelli View Post
UILabel *mylabel; // Connected in IB to a field on the form.

When the state reaches the time you want to change the color on

[mylabel setTextColor:[UIColor redColor]]; // Foreground color
[mylabel setBackgroundColor:[UIColor redColor]]; // Background color

Check the api docs for the other color values and how to roll your own.


Hope this helps.
Rich
So if I have this.
Code:
float tipTotal = tipSelected * 3.8 / [billTotal.text floatValue];
tipAmount.text = [NSString stringWithFormat:@"Tip Percentage: %.2f%", tipTotal];
How do i get it to change to red every time it reaches 20 and up but remain green only on 1-19?

Also thanks for the reply Rich!
__________________
My new app that was recently featured in the App Store section: Soundsations
Creator of the most awesome app iWasted
Also Created the Audience app
Frankie is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,022
Threads: 93,867
Posts: 401,928
Top Poster: BrianSlick (7,963)
Welcome to our newest member, mikel888
Powered by vBadvanced CMPS v3.1.0

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