Connect multiple buttons to a single action

Discussion in 'iOS Programming' started by john903, Oct 23, 2008.

  1. john903 macrumors member

    Joined:
    Apr 11, 2008
    #1
    I have about 25 buttons and I want to connect the "Touch Down" event to the same action for all buttons. I can do this manually for each button but is there a quick way to do this for all the buttons?
     
  2. admanimal macrumors 68040

    Joined:
    Apr 22, 2005
    #2
    Are you asking about a way to do this in Interface Builder or in code?
     
  3. SqueegyX macrumors regular

    Joined:
    Mar 24, 2008
    #3
    in IB, if you have action, drag from the action to a button to link it up. Then just do it again with another button. The little circle by the action change to a + letting you know you can add more items to it.

    Easy as pie.
     
  4. john903 thread starter macrumors member

    Joined:
    Apr 11, 2008
    #4
    In Interface Builder. Yes, but I was wondering if it was possible to do it all at once so I could connect 30 buttons to a single action with one drag versus doing it 30 times.
     
  5. SqueegyX macrumors regular

    Joined:
    Mar 24, 2008
    #5
    No shortcut I know of unless you want to set them up in code. Luckily you only have to do it once.
     

Share This Page