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, 09:14 AM   #2 (permalink)
rdominelli
Registered Member
 
rdominelli's Avatar
 
Join Date: Jul 2009
Posts: 107
rdominelli is on a distinguished road
Default

Quote:
Originally Posted by Frankie View Post
How do I change the color of a Label when it reaches a certain point?

I have this equation and the Label switches to the answer. But when the answers reaches certain points I want the label to change color. How do I go about doing so?
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
rdominelli 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.