Mixing languages: model and view

Consider developing an application in which a model will be written in C ++ (with Boost), and a view will be written in Objective-C ++ (using Cocoa Touch).

Where are examples of how to integrate C ++ and Objective-C ++ to develop iPhone applications?

+4
source share
1 answer

Take it directly from the source: Apple has documentation on using C ++ with Objective-C .

In fact, this is not so much, in my opinion, an attempt to keep parts of C ++ and Objective-C as clean as possible.

In your case, this is natural:

  • limit definition of C ++ classes and other C ++ models
  • restrict part of Objective-C to code related to viewing and using the C ++ model

I don’t know of any simple simple examples, but any cross-platform project with its own GUI on Mac uses the same approach. One of the purest examples is the source of Chromium .

+5
source

All Articles