Dismissing a GL view within a storyboard

Hi guys,

I’m developing an app that uses the Storyboard UI navigation system, all the pages in my navigation inherit from UIViewController. Eventually it segues into a view that uses the ofxiOSViewController and instantiates an openFrameworks C++ app that runs inside that view.

What I want to do is allow the user to go into that view, play a small game which is the openFrameworks app and get back out to the UIKit navigation when finished. My problem is that the ofxiOSViewController doesn’t seem to hold any of the storyboard details (parent view, storyboard id, segues, etc.) so I can’t call any segues on it. I’m trying to dismiss the glView and get back to the UIKit navigation - does anybody know a way of doing this?

Thank you!

This might help https://github.com/trentbrooks/StoryboardOFExample

Thanks so much! That’s exactly what I was looking for - one question though:

  • Do you know what invokes the destruction of the OF application? It seems to only be actually destroyed on unwinding the segue but I’ve been using the example in my project and the app never seems to get destroyed - which then causes a crash as everything tries to initialise again.

Thanks so much.

When using segue’s/storyboard- the parent controller does not get deleted when transitioning to the new controller. So if you have an OF app that segue’s into some view controller- it won’t delete the OF app. The new controller is pushed on top of the OF app. In my example, when you unwind from the ‘end screen’ it goes back 2 levels back to the ‘intro screen’. Does that help?

Yep, that explains it :slight_smile:

Thank you so much!
Pedro