tags:

views:

848

answers:

6

I'd much rather code an app using pure C api such as OpenGL, rather that Cocoa Touch. So I'm wondering: is it feasible? Will I be able to maintain the same user experience that you get with Interface Builder?

+6  A: 

None of the UI components have OpenGL equivalents. Is it possible? Yes. Is it sensible? No - you would be much better off learning how to use IB and the UIView classes. Coding the UI in OpenGL would be like painting your house with an artist's brush, using hand-made paint instead of Dulux.

Airsource Ltd
+3  A: 

Unless you are working on a game, users will expect your user interface widgets to work the same way they do in other applications. You can never emulate that properly, especially if apple decides to fix certain issues in future firmware upgrades, etc...

warpr
+2  A: 

You will also need Cocoa for integrating with the system in general to store data, prefs and so forth. Is there any specific reason for your reluctance to use Cocoa? If it's because you feel an aversion to learning objective-c, then you really ought to give it a proper chance. It's a great language for building ui apps. If you are trying to port an existing app, then I would suggest building a wrapper that will interact properly with the iphone and call your c code from there.

kasperjj
A: 

Honestly, after C Sharp, I really can't imagine myself programming a language like ObjectiveC.

Dmitri Nesteruk
After programming in C# I can't imagine programming in anything other than ObjectiveC, C, or C++. I always feel a little 'dirty' when I have to code in C#.
OhioDude
+1  A: 

This is not a fruitful answer (for that, see AirSource's) and rather a comment on your answer about not using Objective-C, but I learned Objective-C a few months after C# and I find I work well in both. Give it a chance and it will surprise you. There's a learning curve and they are different, but the interface tools in particular are so far ahead that you'll probably find it worth your while. It will definitely be better for you and for your app's users than hand-rolling it in OpenGL.

Jesper
A: 

Depends on your app. Mine's an "immersive" game, so I'm using openGL instead of CocoaTouch,
with a sprinkling of Core Graphics/UIKit calls to generate nice textures.

If I had to display any kind of standard, non-trivial widget, I'd use CocoaTouch.

Rhythmic Fistman