adding a UITextfield from inside an IBAction

Discussion in 'iOS Programming' started by tazboy, Apr 9, 2010.

  1. tazboy macrumors newbie

    Apr 6, 2010
    I'm able to add a textfield inside of an IBAction method via

    [self makeScoreField:10:120];
    but I get a warning stating:

    'GameScorerViewController' may not respond to '-makeScoreField::'
    I'm not sure what the warning means. Any help would be greatly appreciated.
  2. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    It means GameScorerViewController is not aware of any makeScoreField instance method at the point that you make that call. That could be because you haven't defined it at all or not just yet in the implementation file. Either move it up in the implementation file so that it's defined before it's called or declare it in your interface file as public or, better yet, as a so-called private method.

    Also, looks like you are trying to pass two parameters to makeScoreField (10 and 120) but have only named one of them (makeScoreField). I think it's been suggested to you before to step away from the real coding and go (re)learn the basics of Objective-C.

Share This Page