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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-05-2011, 10:15 PM   #1 (permalink)
iPhone Developer
 
alex5776's Avatar
 
Join Date: May 2011
Location: Minnesota
Age: 14
Posts: 26
alex5776 is on a distinguished road
Question UIColor Help Please!

Hi!
I am trying to Enable and disable a button. I know this code and it works
Code:
myButton.enabled = NO;
My problem is that when I do that it shows no change. I want the text to darken or turn grey and when I enable it, it turns to the regular color.
This is my code so far for reenabling it.
Code:
myButton.enabled = YES;
[myButton setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
This works with no errors, but the color is a brighter blue then what is normally there.

Can anyone help?
__________________
-----------
Want to see me run to the apple store and back?
~~~Moments Later~~~
Want to see me do it again?
alex5776 is offline   Reply With Quote
Old 05-05-2011, 10:51 PM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

1. Try setting nil for color. I'm not sure if this will work to set it to default, it works for navbar tint.
2. Check the RGB values of the default color in IB, then set those values using UIColor's method colorWithRedGreenBlueAlpha method.
baja_yu is offline   Reply With Quote
Reply

Bookmarks

Tags
button, color, enable, text, uicolor

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 355
10 members and 345 guests
dansparrow, iOS.Lover, lorrettaui53, MikaelBartlett, Nobbsy, oztemel, pbart, PlutoPrime, thephotographer, Trickphotostudios
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:56 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0