Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sergio10

macrumors regular
Original poster
Oct 3, 2007
137
0
Hi,

I need to develop all custom controls in application.
I'd like to implement UISwitch control for the first time.

Could you please explain how to do it? Maybe you have some tutorials on this?

Thanks
 
@ dejo - awesome!! Sometimes it's hard to be civil when lots of these questions can be answered simply with RTFM - nicely done!
 
Sergio, are you asking how to make a set of controls that look different from the standard controls? Depends and may not be so easy. A switch is maybe the simplest of controls so a good place to start. It basically is a control that has two appearances. Tap it and it toggles between the two appearances.

Look at the Apple example code called Accessory. It shows how to have an accessory in a table view that toggles between two appearances. Unfortunately it doesn't create a UIControl subclass. That's what you should do. Start with UIControl and build a switch.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.