Can't see my stupid mistake. Need help

Discussion in 'iOS Programming' started by LT21j, Apr 24, 2013.

  1. LT21j, Apr 24, 2013
    Last edited: Apr 24, 2013

    LT21j macrumors newbie

    Joined:
    Apr 8, 2013
    #1
    Hey I know there must be something I'm missing that should be obvious but I need some help because I can not find it. I have a class TeacherViewController and it inherits from UIViewController. But when I try to call the method performSegueWithIdentifier, I get an error saying: No visible @interface for 'TeacherViewController' declares the selector 'performSegueWithIdentifier:'.
    Here's my code for TeacherViewController.m:

    Code:
    @interface TeacherViewController ()
    
    @end
    
    @implementation TeacherViewController
    -(void) segueMethod
    {
        [self performSegueWithIdentifier: @"toSchedule"];
    }

    Is there something obvious I am missing?
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    There is no performSegueWithIdentifier: method. Perhaps you mean performSegueWithIdentifier:sender:?
     
  3. Duncan C macrumors 6502a

    Duncan C

    Joined:
    Jan 21, 2008
    Location:
    Northern Virginia
    #3

    Suggestion: Do a search in the Xcode docs for "performSegueWithIdentifier". Take a look at the results. That should give you the answer you are after. (The documentation is a wonderful thing.)
     
  4. LT21j thread starter macrumors newbie

    Joined:
    Apr 8, 2013
    #4
    YEPPPPPPPPP......I hate when I do stuff like that. Thank you for the help I wouldn't have seen that for an hour while I checked all the other things that could possibly be wrong.........
     
  5. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #5
    Are you sure TeacherViewController inherits from UIViewController, i.e. is a subclass of it? I don't see it, so maybe you've left something out.
     

Share This Page