How to make custom control?

Discussion in 'iOS Programming' started by Sergio10, Aug 27, 2009.

  1. Sergio10 macrumors regular

    Joined:
    Oct 3, 2007
    #1
    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
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    What do you mean by "all"? Every single one of your controls? And what do you mean by "custom"?

    By the way, UISwitch is not a custom control. It's a standard one.

    As for tutorials:
    http://tinyurl.com/ld8hks
     
  3. icewing macrumors 6502

    Joined:
    Jun 19, 2008
    Location:
    St Louis
    #3
    @ dejo - awesome!! Sometimes it's hard to be civil when lots of these questions can be answered simply with RTFM - nicely done!
     
  4. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    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.
     

Share This Page