简体   繁体   English

在Xamarin Forms应用程序中使用iOS特定元素

[英]Use an iOS specific element in a Xamarin Forms app

I'd like to use an iOS specific element (SceneKitView) in my Xamarin Forms app but I'm not sure how to go about it. 我想在Xamarin Forms应用程序中使用iOS特定元素(SceneKitView),但是我不确定该怎么做。

I read this article , but I'm not sure if I'll be able to create a visual element (aka a view) this way. 我阅读了这篇文章 ,但不确定是否可以通过这种方式创建视觉元素(也称为视图)。

What classes should I implement and what configurations do I have to do to achieve this? 我应该实现哪些类以及必须完成哪些配置? Also, I'm using a different DI framework than the one provided by Xamarin, is that gonna be a problem (I'm using Ninject)? 另外,我使用的X框架不同于Xamarin提供的DI框架,这是否会成为问题(我使用的是Ninject)?

Basically, my question is how do you create custom cross-platform views in Xamarin Forms (a github example would be great!). 基本上,我的问题是如何在Xamarin Forms中创建自定义的跨平台视图(一个github示例将是很棒的!)。

I know there is a cross-platform equivalent to SceneKit but right now I don't have the time to redo the code for the 3D scene. 我知道有一个等效于SceneKit的跨平台,但是现在我没有时间为3D场景重做代码。

Ok found it. 确定找到了。

The concept is called Custom Renderers. 这个概念称为自定义渲染器。

Here a link to the doc: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/ 这里是文档的链接: https : //docs.microsoft.com/zh-cn/xamarin/xamarin-forms/app-fundamentals/custom-renderer/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM