Let go to click UIButton

Discussion in 'iOS Programming' started by spaceman816, Jun 2, 2010.

  1. spaceman816 macrumors member

    Joined:
    Jul 29, 2009
    #1
    I want users to click one button, hold, and select a different button by simply letting go over it (simlar to the way holding a file menu on a computer works).
    Simply doing a touch down method on the first button and a touch up on the second doesn't work- touch up doesn't seem to react unless the touch down took place in the same button.
    Sorry if I worded that confusingly.
    Thanks
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Do you have a strong reason for going against the normal way users expect things to work using the iPhone OS?
     
  3. spaceman816 thread starter macrumors member

    Joined:
    Jul 29, 2009
    #3
    I think it's pretty intuitive.
    I'm just trying to do a color picker of a few colors that you click and hold to make appear, and let go to select.
     
  4. matoch macrumors member

    Joined:
    Oct 12, 2006
    #4
    I think it would be more natural for the user to click a button to bring up the color selection tool and then click the color that they want to use. What you describe feels a bit awkward to me. And sorry I don't know how to implement what you've asked.
     
  5. spaceman816 thread starter macrumors member

    Joined:
    Jul 29, 2009
  6. jnic macrumors 6502a

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
    #6
    Rather than using UIButtons, you're probably better off creating a single custom view whose touch events you override, since they all pass a touch position which you can act upon based on your "button"s' positions in the view.
     
  7. PatrickCocoa macrumors 6502a

    Joined:
    Dec 2, 2008
    #7
    I agree with jnic, if you're not using the standard interface behavior for buttons, that's an indication not to use buttons to implement it. Use a custom view, override the methods in that view to do what you want.
     

Share This Page