Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create Cocoa interfaces without Interface Builder?

I would prefer to create my interfaces programatically. Seems as if all the docs on Apple Developer assume you're using Interface Builder. Is it possible to create these interfaces programatically, and if so where do I start learning about how to do this

I thought the relevant document for this, if possible would be in this section: http://developer.apple.com/referencelibrary/Cocoa/idxUserExperience-date.html

like image 979
Bjorn Avatar asked Apr 04 '09 17:04

Bjorn


People also ask

What language is cocoa from?

Etymology 1. From Spanish cacao, from Classical Nahuatl cacahuatl. The form cocoa by confusion with coco, popularized by Samuel Johnson's A Dictionary of the English Language. Doublet of cacao.

What is Interface Builder in Swift?

Interface Builder The first is an editor, where you write the Swift code that makes your application run. The second is Interface Builder, which is the part where you lay out the graphical interface of your program—the buttons, toolbars, menus, images, and text that make up how your users interact with your program.


1 Answers

I like the question, and I'd also like to know of resources for going IB-less. Usefulness (the "why") is limited only by imagination. Off the top of my head, here are some possible reasons to program UIs explicitly:

  • Implementing a better Interface Builder.
  • Programming dynamic UIs, i.e., ones whose structure is not knowable statically (at compile/xcode time).
  • Implementing the Cocoa back-end of a cross-platform library or language for UIs.

There is a series of blog posts on working without a nib and a recent description by Michael Mucha on cocoa-dev.

like image 159
Conal Avatar answered Oct 07 '22 15:10

Conal