Search code examples
iosobjective-cvuforiaavplayerviewcontrolleravkit

AVKit Player View Controller Segue break


I'm trying to segue from a view controller to an AVKit Player View Controller. I'm using Vuforia's framework to do image recognition on a camera. My issue is that when I try to segue over, it says that segue just doesn't exist. However, if I segue to a different controller and then segue into the video player it works fine. Took me a long time to even find that work around. If you have any ideas on why this is, let me know please. I understand this probably isn't an easy problem to replicate without using Vuforia's SDK, so any additional details that you need let me know.

Segue code:

    [self performSegueWithIdentifier:@"test" sender:self];

I promise the name of the segue is correct, because it worked into the regular View Controller. I also tried programmatically playing using AVPlayerViewController, but that was a nightmare in terms of handling Vuforia's protocols.


Solution

  • My issue was related to the fact that I was trying to call the segue command from a class rather than the actual view controller, and since the class wasn't attached to anything by segue, it didn't know what to do with the command to segue.