This discussion is archived
8448 Views 6 Replies Latest reply: May 1, 2008 2:08 PM by leo4ever
Currently Being ModeratedApr 29, 2008 8:04 PM (in response to mhackney)The only thing built-in that does this is a UISwitch. What you could do is style a single button and link an action to it to store the toggle value, which would also change the style of the button.
I've not dug into the buttons stuff, but if there isn't advanced styling to simulate this, you could get around it with an ugly hack: switching between two buttons w/ linked actions (e.g. createGrayButton/createDarkGrayButton), and disabling animation during the 'hiding' transition.
My terminology is atrociously off, but you get the concept.MacMini/iPhone!, Mac OS X (10.5.2)
Currently Being ModeratedApr 30, 2008 5:16 PM (in response to mhackney)Forgive me, but I would question why you're not using a UISwitch? Based on your limited explanation of what you're trying to do, a UISwitch would be the iPhone way to do it. Why change it up? Why not leverage expectations of existing users based on the way the UI works?
Maybe you have a good reason -- I hope so, because a consistent UI is a real boon to users, new and old.
rjf&Macbook Pro, Mac OS X (10.5.2)
Currently Being ModeratedMay 1, 2008 1:44 PM (in response to itripn)Well, I am developing an audio recording application and the "standard" UI has toggle push buttons for record, pause, stop, play. The slider does not work well in this context.Mac OS X (10.4.3)
Currently Being ModeratedMay 1, 2008 2:08 PM (in response to mhackney)Take a look at the UIBarButtonItem class. Apple provides system buttons with images for play, pause, forward, rewind etc. My suggestion would be to have a interface like the iPod where there are controls to stop, play, etc. If that doesn't work, just use a simple UIButton with Glass Style and change the tintcolor property. Ofcourse, you can change the appearance/text when user click on it. From my experience, a toggle button is just like a boolean and should be used in places where the needed answer is YES/NO. And if you had noticed (in iPhone), the UIswitches are mostly used for settings management and never actually used for controlling application.
JavidMac Mini, Mac OS X (10.5.2)