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 06-21-2009, 01:09 PM   #3 (permalink)
Ins3rtNam3H3r3
Registered Member
 
Join Date: Jun 2009
Location: Fort Lauderdale, Florida
Posts: 67
Ins3rtNam3H3r3 is an unknown quantity at this point
Default

Quote:
Originally Posted by kingbombs View Post
So i think you can do something like this (assuming button is red and you want to change to blue briefly):
Have a method called something like (void)changeColor
Code:
- (void)changeColor {
      button.setColor('Red'); // probably not right syntax for setting color
}
then in your IBAction method for checking if user has pressed the button or where ever you do that check, have something like (not sure if this will deffaintly work):

Code:
button.setColor('Blue');
[self performSelector: @selector(changeColor) withObject:nil afterDelay:2];
this should after 2 seconds call the changeColor method, which will set the button back to red.

hope this helps!
To set the color of a label you would do:
Code:
[label setTextColor:[UIColor redColor]];
or
Code:
label.textColor = [UIColor blueColor];
Ins3rtNam3H3r3 is offline   Reply With Quote
 

» Advertisements
» Online Users: 442
18 members and 424 guests
baja_yu, buggen, coolman, evilmatt10, givensur, guusleijsten, Kieren Harrold, networ, pabloruiz55, pochuang, QuantumDoja, Sami Gh, scubadivingfool, Speed, teebee74, TheStalker, thestojkovic, za1407
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,636
Threads: 94,101
Posts: 402,819
Top Poster: BrianSlick (7,990)
Welcome to our newest member, samdanielblr
Powered by vBadvanced CMPS v3.1.0

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