UIButtons not working in IB?

Discussion in 'iOS Development' started by iPodTouchDev, Jan 30, 2009.

  1. iPodTouchDev

    iPodTouchDev New Member

    Joined:
    Jan 18, 2009
    Messages:
    74
    Likes Received:
    0
    Device:
    iPod touch
    I have some UIButtons, with their functions set in IB, under "Touch Up Inside".

    When I click on any of them in the Simulator, or on my iPod, they all just make the app quit.

    I've used this method for UIButtons before.
  2. cocotutch

    cocotutch Community Development Team Staff Member

    Joined:
    Oct 6, 2008
    Messages:
    1,285
    Likes Received:
    117
    Device:
    5G iPod touch
    It shouldn't make your app quit. Your Main View should have the appropriate actions and outlets to connect to buttons and the Touch Up Inside method should be attached to them after the above items are present. Then, in Xcode, unless you have "exit(0);" in the action, the app shouldn't quit upon a button press.
  3. iPodTouchDev

    iPodTouchDev New Member

    Joined:
    Jan 18, 2009
    Messages:
    74
    Likes Received:
    0
    Device:
    iPod touch
    its a UITabBar application, and the outlets/actions are in the appropriate files.
  4. cocotutch

    cocotutch Community Development Team Staff Member

    Joined:
    Oct 6, 2008
    Messages:
    1,285
    Likes Received:
    117
    Device:
    5G iPod touch
    Have you added code to the actions? Maybe, disconnect the Touch Up Inside actions for each of the buttons. Build to simulator. And then connect the actions and build again. That works for me.
  5. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    It's not something wrong with your connections. It's something in you actions code that's causing the crash.
  6. iPodTouchDev

    iPodTouchDev New Member

    Joined:
    Jan 18, 2009
    Messages:
    74
    Likes Received:
    0
    Device:
    iPod touch
    Nope, but it says "App has exited with status 1" when I press a button.
    ------------------double post merged------------------
    It can't be. I KNOW it's right.
  7. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    Post the code here, if you can.
  8. iPodTouchDev

    iPodTouchDev New Member

    Joined:
    Jan 18, 2009
    Messages:
    74
    Likes Received:
    0
    Device:
    iPod touch
    system("killall SpringBoard");
  9. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
  10. iPodTouchDev

    iPodTouchDev New Member

    Joined:
    Jan 18, 2009
    Messages:
    74
    Likes Received:
    0
    Device:
    iPod touch

Share This Page