Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Monogame View to Xamarin Storyboard for iOS

I'm very used to working with Monogame but am just getting started in Xamarin. I have created a Xamarion iOS project with a storyboard (seen in picture). This works and I have created Segues and web service calls and what not that work great.

Now to the question. How do I add a Monogame view to this? Ideally I would like to add a Monogame view to the same storyboard that I can just switch to like I do all the Views. I have however not been able to find any guides or hints on how to do this. The guides I have found so far either speak of storyboards or a Monogame app, not how to use them together.

enter image description here

Update: Any answer that shows how to start a Monogame instance while in the regular storyboard mode programatically and exit back into the storyboard menues is acceptable. It does not have to be a subview, I'm fine with if it takes the whole screen.

like image 535
JensB Avatar asked Oct 30 '22 23:10

JensB


1 Answers

It's hard to answer this question in a better way than this stackoverflow answer ... but to summarize, you probably want to let MonoGame "run" the application for you, and when you want to use UIKit, you'd basically either push a custom controller onto the stack, or show a new UIView on top of the existing monogame screen.

Sadly, you will have to modify how MonoGame works if you want to show your MonoGame game after a UIKit controller.

like image 96
Joel Martinez Avatar answered Nov 08 '22 09:11

Joel Martinez