iphone - Using UIKit from C/C++ -


Questions can be asked in advance, but I want to understand that the framework of the iPhone is limited only to objective-use Or can it be accessed with the C / C ++ code? For example, is it possible to use standard iPhone control with C / C ++ code? Are NSArray accessible from NSSet standard C / C ++ code?

If they are, can any one link to some examples, how to do this?

You can combine the objective with C ++ just by the name of your source file Change to .mm . . Some foundation classes like NSArray and NSSet are toll free bridges for Core Foundation Objects like CFRRRE and CFSAT. The latter is a pure C library that you can use without OBJC.


UIKit is a pure purpose C framework such as objc_msgSend , such as

  id from pure C function such as C and C Can use UICT with ++  may  UIView = objc_getClass ("UIView"); SEL alloc = sel_registerName ("alloc"); ID view = objc_msgSend (UIView, alloc); // ...  

but it is not reliable, e.g.

  objc_msgSend (see sel_registerName ("setAlpha:"), 0.4); 

No

No

You can separate the UI part You can write objcci for that part. Create a C interface between the UI and backend, which you can use in C ++ or any (allowed) languages.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -