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 offline   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

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

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
How do I gray out UIWeb Back Button and Forward Buttons? troop231 iPhone/iPad Programming 14 Apr 11, 2011 02:24 PM
Reset Button on Disk Warrior Grayed out Jpin Mac Basics and Help 3 Jun 2, 2009 10:17 AM
Sync Button Grayed Out Mobile Me Prettywm iCloud and Apple Services 0 Aug 12, 2008 09:36 AM
Yellow "minimize" button grayed out imacfreak Mac Basics and Help 1 Sep 5, 2007 11:21 PM
Yellow (Minimize) button grayed out imacfreak OS X 3 May 5, 2005 03:13 PM


All times are GMT -5. The time now is 10:58 PM.

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

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