Why couldn't perform a segue in another view controller?

Discussion in 'iOS Programming' started by pan17, Jul 22, 2012.

  1. pan17 macrumors newbie

    Joined:
    Jul 9, 2012
    #1
    I set up a segue in a view controller say called A.
    Then i want to perform this segue in another view controller called B, i did this:
    Code:
    A *a = [[A alloc] init];
    [a performSegueWithIdentifier:@"Photos" sender:a];
    Then it gives me an error says A doesn't have the corresponding segue to "Photos". But when i call this in the A view controller, then it could perform the segue without any error.
    Why? Thanks
     
  2. ppilone macrumors 6502

    Joined:
    Jan 20, 2008
    #2
    From the UIViewController documentation for performSegueWithIdentifier:sender:

     

Share This Page