本文介绍了自动转换Xamarin iOS和Android的Xamarin之间code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直使用Xamarin建立一个非常定制的布局iOS应用程序。我的计划是建立在准确的Andr​​oid Xamarin相同的应用程序。我渴望做到这一点,我有兴趣到去了解Android作为很好,但它是大量的工作重复。 Xamarin窗体股GUI code跨平台扩展了一些,但它使我不知道是否有任何计划来自动转换iOS和Android之间code。自动转换会的时间很多的安全,并允许开发者选择他所喜欢的开发平台。

I have been using Xamarin to build an iOS app with a very customized layout. My plan is to build exactly the same app in Xamarin Android. I am eager to do it and I am interested into getting to know Android as well but it's alot of work to repeat. Xamarin Forms shares GUI code across platforms to some extends but it makes me wonder if there are any plans to automatically convert code between iOS and Android. Auto conversion would safe alot of time and allows the developer to choose his favorite platform to develop on.

有像并的以不知道他们是多么可靠的本地语言之间的转换。我的问题是,如果有任何未来计划或开源项目进行自动转换Xamarin的iOS到Android,反之亦然?

There are sites like https://www.myappconverter.com/ and http://www.apportable.com/ for converting between native languages not sure how reliable they are. My question is if there any future plans or open source projects for auto converting Xamarin iOS to Android and vice versa?

谢谢!

推荐答案

没有,没有有关转换code计划。 Xamarin为您提供了不同的平台,分享高达code尽可能的机会。您可以使用Xamarin.Forms一次创建一个用户界面,并得到它本身呈现在所有平台上。如果你不喜欢,你可以选择Xamarin.iOS和Xamarin.Android打造原生的UI Xamarin.Forms的限制。
MvvmCross允许您使用MVVM-模式。这样,你只需要重新创建用户界面本身无需编写导航逻辑两次。

No, there are no plans about converting code. Xamarin gives you the opportunity to share as much code as possible over different platforms. You can use Xamarin.Forms to create a UI once and get it rendered natively on all platforms. In case you don't like the restrictions of Xamarin.Forms you can chose Xamarin.iOS and Xamarin.Android to build the native UIs.MvvmCross allows you to use the MVVM-Pattern. By doing this, you only need to recreate the user interface itself without writing navigation logic twice.

如果您不知道是否要选择Xamarin.Forms与否,看看这里:When使用Xamarin.Forms VS Xamarin本土?

If you don't know whether to chose Xamarin.Forms or not, take a look here: When to use Xamarin.Forms vs Xamarin Native?

自动转换code是一般一个坏主意。平台和语言是如此不同,一个自动转换的结果不会感觉好极了。

Converting code automatically is a bad idea in general. Platforms and languages are so different that the result of an automatic conversion never feels great.

Xamarin已经提供了你需要创建用户界面对于没有太多的痛苦不同平台的应有尽有。这是对你采取的最好出来。

Xamarin already provides everything you need to create UIs for different platforms without much pain. It's on you to take the best out of it.

这篇关于自动转换Xamarin iOS和Android的Xamarin之间code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 09:08