(noobie) question about dot notation

Discussion in 'iOS Programming' started by ryans79, May 26, 2009.

  1. ryans79 macrumors regular

    Joined:
    Apr 12, 2009
    #1
    Hello,

    I'm just learning how to use xcode and IB so please excuse my question if its too newbie.

    I have an action:

    -(IBAction) textFieldDoneEditing: (id)sender
    {
    [sender resignFirstResponder];
    //resignFirstResponder.sender;
    //sender.resignFirstResponder;
    }

    and as it might be familiar to all of you, i am trying to get rid of the keyboard when the user clicks on "Done"... its working except not in dot notation... if i wanted to use dot notation instead of the "classic" way above, how would i do it?

    (the commented ones are the ones i tried... needless to say, they dont work)

    °°
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    That syntax should only be used for @properties. While it might work in some situations outside of that, it should be reserved for @properties only. So just use
    Code:
    [sender resignFirstResponder];
     
  3. ryans79 thread starter macrumors regular

    Joined:
    Apr 12, 2009

Share This Page