disabling UIBarButtonItem

Discussion in 'iOS Programming' started by yaboy10holla, Mar 6, 2011.

  1. yaboy10holla macrumors newbie

    Feb 19, 2011
    in my app I have a textfield and a send button within a toolbar, and I want to enable the send button (UIBarButtonItem) when the textfield is in use, and disable it when it is not. Its being a little stubborn, however.

    I set the button's state to disable in interface builder, and I'm trying to call this action:

    [myBarButtonItem setEnabled:YES];

    and im trying to connect it to the textfield's "did begin editing" event but i can't get it to work. Any suggestions??

  2. jnoxx macrumors 65816


    Dec 29, 2010
    Aartselaar // Antwerp // Belgium
    Look up the delegate methods of ur UITextField, in those method's u can put ur code to enable/disable ^_-
    They are all http://developer.apple.com or command option double click ur UITextField

Share This Page