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

查看:27
本文介绍了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/二进制/等?

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 编译来生成单个静态编译文件 - 因此它不会在 iPhone 上实现 .Net 运行时.Monotouch 使用绑定到暴露给 C# 的 iPhone 库.没有翻译成 Objective-C.

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 操作系统的库调用.

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天全站免登陆