我可以用C ++语言写Cocoa Touch [iPhone]应用程序 [英] Can i write Cocoa Touch[iPhone] applications in C++ language

查看:137
本文介绍了我可以用C ++语言写Cocoa Touch [iPhone]应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1)我可以用纯C ++语言编写iPhone应用程序,我知道我们可以使用Objective-C ++,我只想知道我们是否也可以用纯C ++语言编写。



2)在XCode中创建MAC OX应用程序时,我们有一个选项来创建C / C ++应用程序,同样的选项对我来说是否适用于编写iPhone应用程序?

解决方案

您不能使用纯C ++ - 至少UI的一部分必须用Objective C / Objective C ++编写,因为所有应用程序都必须提供一个委托和一个主视图。 / p>

一旦你有应用程序运行,不想使用UI库(如游戏),你可以继续使用Core Graphics或OpenGL来处理屏幕绘制。您将需要一个小的Objective C / C ++层来处理触摸事件。


1) Can i write iPhone applications in pure C++ language, i know that we can use Objective-C++, i just want to know if we can also write it in pure C++ language.

2) while creating MAC OX application inXCode, we have an option to create C/C++ application, will the same options work for me to write iPhone applications?

解决方案

You cannot use pure C++ only - at least a portion of the UI must be written in Objective C/Objective C++, as all applications must provide a delegate and a main view.

Once you have the application running and do not wish to use the UI libraries (such as a game), you can proceed to use Core Graphics or OpenGL to handle screen drawing. You will need a small Objective C/C++ layer to handle touch events.

这篇关于我可以用C ++语言写Cocoa Touch [iPhone]应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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