MonoTouch如何工作? [英] How MonoTouch works?

查看:70
本文介绍了MonoTouch如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很感激任何人都可以简要地向我解释一下,实现MonoTouch之类的通用方法是什么?我真的很惊讶,因为这不是我看到的第一个示例,当人们获得Java之类的平台并将其转换为C / Objective-C之类的东西时。我真的无法想象垃圾收集器之类的东西是如何翻译的。

I would really appreciate it anybody could briefly explain me, what's the general approach to implementing things like MonoTouch? I'm really amazed because it's not the first example I see when people get some platform like Java and make it translate into something like C/Objective-C. I can't really imagine how things like Garbage collector and stuff are being translated.

预先感谢。

编辑:我了解将一种语言翻译成另一种语言的理论可能性。我的问题是一些技术性的问题:他们是否在ObjC中实现完整的运行时并将其捆绑? (我对此表示怀疑...)或者他们只是将C#代码转换为ObjC / binary / etc?

EDIT: I understand theoretical possibility of translating one language into another. My question is a bit more technical: do they implement a complete runtime in ObjC and bundle it? (I doubt it...) Or they just translate C# code into ObjC/binary/etc?

推荐答案

Monotouch使用Ahead-Of-Time编译来生成单个静态编译文件-因此它不实现.Net运行时在iPhone上。 Monotouch使用绑定到暴露给C#的iPhone库。

Monotouch uses Ahead-Of-Time compilation to produce a single statically compiled file - so it does not implement the .Net runtime on the iPhone. Monotouch uses binding to the iPhone libraries exposed to C#. There is no translation to Objective-C.

基本上,它使您熟悉使用C#及其相关的工具链,同时公开了底层iPhone OS的库调用。

Basically, it gives you the familiarity of working in C# and its associated toolchain while exposing the library calls of the underlying iPhone OS.

Miguel di Icaza在他作为嘉宾的Stackoverflow播客中对此做了些解释。 链接

Miguel di Icaza explained this a bit on the Stackoverflow podcast where he was a guest. link

这篇关于MonoTouch如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆