Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 5, 2009, 05:48 AM   #1
milktooth
macrumors member
 
Join Date: Oct 2009
Grayed out buttons. Best approach?

How do you gray-out buttons, particularly segmented controls?

I've tried setting alpha to .5, but with segmented controls the left and right parts overlap leaving an opaque strip in the center. Is there a preferred approach?
milktooth is offline   0 Reply With Quote
Old Nov 5, 2009, 05:59 AM   #2
Thomas Harte
macrumors 6502
 
Join Date: Nov 2005
The best I've come up with is putting a half-transparent quad on top with the same colour/texture as the background on which the controls appear. It's fiddly though, so I'd say recommended only if someone doesn't have a better idea...
Thomas Harte is offline   0 Reply With Quote
Old Nov 5, 2009, 08:28 AM   #3
PhoneyDeveloper
macrumors 68030
 
PhoneyDeveloper's Avatar
 
Join Date: Sep 2008
Code:
button.enabled = NO;
is the usual way. Not sure for segmented controls though.
PhoneyDeveloper is offline   0 Reply With Quote
Old Nov 5, 2009, 09:37 AM   #4
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Have you tried using setEnabled:forSegmentAtIndex: ?
__________________
dejo is online now   0 Reply With Quote
Old Nov 5, 2009, 10:11 AM   #5
milktooth
Thread Starter
macrumors member
 
Join Date: Oct 2009
I have now.

Thanks. Just the ticket.
milktooth is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
What's the best approach in this case? xelhark Mac Programming 0 Jun 25, 2013 05:12 AM
I don't know how I should approach this.. Xexis MacBook Pro 2 May 31, 2013 05:01 PM
Do not Disturb (DND) - a better approach reinhard iOS 6 3 Jun 12, 2012 05:08 AM

Forum Jump

All times are GMT -5. The time now is 09:56 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC