Utilizing C++ in iOS and Mac OS X applications

前端 未结 5 1893
清歌不尽
清歌不尽 2020-11-30 22:09

I\'m somewhat moderate in my C++ knowledge but know next to nothing regarding Objective-C. I am planning (and even starting to) learn Objective-C so I can attempt to write a

5条回答
  •  不思量自难忘°
    2020-11-30 22:33

    Short answer, yes.

    For pure C++, you should take a look at the QT framework.
    Otherwise, you'll have hard time for the UI part.

    But also remember that Objective-C can be mixed with C++.
    That's called Objective-C++ (.mm files).

    You can then write code that mix C++ and Objective-C code. With this, you can have the UI parts in Objective-C (may be better, as it will use the native frameworks for the UI components), and the other things in C++.

    If you've decided to learn Objective-C, but still want to code in C++ for some parts, I would recommend this approach, instead of pure C++.

    On iOS, this is also the only way. While you can code in C++, you have to use Objective-C for the UI part.

    EDIT

    Here are a few links to get started with Objective-C++:

    • Strategies for Using C++ in Objective-C Projects
    • From C++ to Objective-C
    • CocoaDev

提交回复
热议问题