press UIButton prorammatically

Discussion in 'iOS Programming' started by arnieterm, Sep 18, 2008.

  1. arnieterm macrumors regular

    Joined:
    Aug 28, 2008
    #1
    In order to do press a UIButton programmatically should we use setTouchInside? I have tried it but it gives me warning. I have declared the UIbutton in the header file
    Thanks
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    What are you trying to achieve? The visual effect that the button was pressed or simply for the action that the button press would trigger happens.

    Because if is the latter simply asking the button for it's target and action and calling would be easier.

    If it's the former why? Do you not think that the user will be confused if it looks like they pressed a button when they did not?
     
  3. arnieterm thread starter macrumors regular

    Joined:
    Aug 28, 2008
    #3
    Yes, I want to do this thing but how that I don't know
     
  4. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4

Share This Page