xamarin - 将 Monogame View 添加到 Xamarin Storyboard for iOS

标签 xamarin xamarin.ios monogame

我非常习惯使用 Monogame,但我才刚刚开始使用 Xamarin。我创建了一个带有 Storyboard 的 Xamarion iOS 项目(如图所示)。这行得通,我已经创建了 Segues 和 Web 服务调用,还有什么不那么好用的。

现在来回答这个问题。
如何为此添加 Monogame View ?
理想情况下,我想将 Monogame View 添加到同一个 Storyboard中,我可以像执行所有 View 一样切换到该 Storyboard 。但是,我无法找到有关如何执行此操作的任何指南或提示。到目前为止,我找到的指南要么是讲 Storyboard,要么是 Monogame 应用程序,而不是如何一起使用它们。

enter image description here

更新 :任何显示如何在常规 Storyboard模式下以编程方式启动 Monogame 实例并退出回到 Storyboard菜单的答案都是可以接受的。它不必是 subview ,如果它需要整个屏幕,我就可以了。

最佳答案

很难用比 this stackoverflow answer 更好的方式来回答这个问题。 ...但总而言之,您可能希望让 MonoGame 为您“运行”应用程序,并且当您想要使用 UIKit 时,您基本上要么将自定义 Controller 推送到堆栈上,要么显示一个新的 UIView在现有的单一游戏屏幕之上。

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

关于xamarin - 将 Monogame View 添加到 Xamarin Storyboard for iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38607418/

相关文章:

xamarin - 在 Visual Studio 2015 预览版中构建和运行 Xamarin iOs 应用程序时出错

c# - 在文件共享 Xamarin.forms 中获取原始文件名

ios - 滑动删除应该删除行并在 UITableView 中添加一个新行

ios - UIAlertView 不工作是 Xamarin.iOS

ios - Xamarin.iOS 属性与 { get; 的绑定(bind)问题} vs { 得到;放; }

windows - 在 Windows 10 中创建 Hyper-V 管理员组

ios - 无法在设备上部署应用程序

android - Spritefont 文件未加载 Monogame Xamarin

c# - GameTime 始终为 0 - MonoGame (XNA) - C#

c# - 在 DLL 'glBindFramebuffer' 中找不到名为 'opengl32.dll' 的入口点。在 MonoGame 3.0 中