views:

247

answers:

2

Could I write c++ code that interacts with the iPhone Quartz 2D framework, or can I only using objective-c?

Thanks

A: 

I think Quartz 2D is a C framework isn't it? As long as you only call the C APIs, you can use C++ by itself. If you want access to any Objective-C frameworks, you will need to look into Objective-C++.

Carl Norum
+1  A: 

Yes. Quartz is a C framework. You can use C++ code that uses Quartz.

You will need some Objective-C to launch your application and get a graphics context for a view to draw into.

Dominic Cooney
Adding just a bit - Objective-C++ allows use of Objective-C and C++ simultaneously, which is likely to be useful to you. The class models don't interact, it just allows you to use both.
Ken
Actually, technically, Objective-C++ makes the same extensions to C++ that Objective-C makes to C. This is only different from what I said above because C++ is not a strict superset of C.
Ken