日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

net程序员的iPhone开发-MonoTouch

發布時間:2023/11/30 编程问答 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 net程序员的iPhone开发-MonoTouch 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

net程序員的iPhone開發-MonoTouch

iPhone軟件的Native開發除了使用Apple推薦的Objective-C? Cocoa之外,也有其他的一些工具和SDK提供

基于WEB的形式的一些框架在下面這個文章介紹過

各種SmartPhone上的跨平臺開源框架的總結

http://www.cnblogs.com/2018/archive/2010/12/28/1918814.html

?

對于.net人員來說,使用C#語言也可以進行開發,這就是MonoTouch

monotouch

2009年Novell開始的項目

通過MonoTouch,使用C#語言實現可以在iPhone上發布和銷售的軟件

MonoTouch免費版本只能在模擬器中開發調試和測試,在iPhone設備和app store上必須購買授權。http://monotouch.net/DownloadTrial

開發環境準備

?1. Make sure you have your Intel Mac running at least version 10.5.7

? 2. Download and install the Mono framework: www.go-mono.com/mono-downloads/download.html.

? 3. Download and install MonoTouch: http://monotouch.net/

? 4. Download and install MonoDevelop: http://monodevelop.com/Download

? 5. Download and install the iPhone SDK: www.apple.com/downloads/macosx/development_tools/iphonesdk.html.

安裝好以上的工具后就可以使用MonoDevelop進行開發了

MonoTouch 組件和類庫

MonoTouch is made up of the following four components:

  • The? Monotouch.dll is a C# assembly that provides a binding API into the iPhone’s native APIs.
  • A command-line tool that compiles C# and Common Intermediate Language (CIL) code. This compiled code can then be run in the simulator or an actual iPhone.
  • An add-in to MonoDevelop that allows for iPhone development and for Interface Builder to create graphical applications.
  • A commercial license of the Mono runtime, which allows for the static linking of the Mono runtime with the code developed.

最常用的命名空間

  • MonoTouch.ObjCRuntime: This namespace provides the interop/bridge between the .NET/C# world and the Objective-C world of the iPhone.
  • MonoTouch.Foundation: This namespace provides support for the data types necessary to communicate with the Objective-C world of the iPhone. Most types are directly mapped. For example, the NSObject Objective-C base class is mapped to the MonoTouch.Foundation .NSObject class in C#. Some classes are not directly mapped and are instead mapped to their native .NET types. For example, NSString maps to the basic string type and NSArray maps to a strongly typed array.
  • MonoTouch.UIKit: This namespace provides a direct mapping between the UI components within Cocoa Touch. The mapping is done by providing .NET classes for each UI component, and this is the namespace that developers will likely spend most of their time working with. For .NET developers, Cocoa Touch is an abstraction layer or API for building programs that run in the iPhone. Cocoa Touch is based on the Cocoa API used in building programs that run on the Mac OS X operating system. Cocoa Touch can be thought of as Cocoa tuned for the touch-based iPhone operating system.
  • OpenTK: This namespace is a modified version of the OpenTK API. OpenTK is an objectoriented binding for OpenGL, which stands for the Open Graphics Library. OpenGL is an API for using three-dimensional graphics. OpenTK is a library for performing OpenGL, OpenAL, and OpenCL. It is written in C# and runs on Windows, Mac OS X, and Linux. The OpenTK implementation on the iPhone has been updated to use CoreGraphics and to only expose the functionality available on the iPhone.

總結

以上是生活随笔為你收集整理的net程序员的iPhone开发-MonoTouch的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。