# xibless

Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

# xibless - Get rid of XIBs and XCode

xibless is a library that generates Objective-C code that builds Cocoa UIs. The goal of this library is to replace XIBs in XCode and, if you want, get rid of XCode altogether.

With xibless, instead of designing UIs with a WYSIWYG editor, you build them in a Python script, similarly to what you do when you build Qt UIs without the Designer. For example, a script like this:

result = Window(330, 110, "Tell me your name!")
nameLabel = Label(result, text="Name:")
nameField = TextField(result, text="")
helloLabel = Label(result, text="")
button = Button(result, title="Say Hello")

nameLabel.width = 45
nameLabel.moveTo(Pack.UpperLeft)
nameField.moveNextTo(nameLabel, Pack.Right, align=Pack.Middle)
nameField.fill(Pack.Right)
helloLabel.moveNextTo(nameLabel, Pack.Below, align=Pack.Left)
helloLabel.fill(Pack.Right)
button.moveNextTo(helloLabel, Pack.Below, align=Pack.Right)
nameField.setAnchor(Pack.UpperLeft, growX=True)
helloLabel.setAnchor(Pack.UpperLeft, growX=True)
button.setAnchor(Pack.UpperRight)


would generate Objective-C code that build a form with a name field, a text label and a button. The second part of the script places the widgets on the form appropriately.

Although xibless is written in Python, the Objective-C code it generates has no Python dependency, so this tool is suitable for any Cocoa developer.

xibless runs on Python 2.7 and up. This means that if you're on OS X 10.7 or newer, you can use the built-in Python. Otherwise, you'll have to install a more recent version of Python.

Installation and usage: Please refer to the Documentation for installation and usage instructions.

## Early Development

xibless is in very early development and the number of rough edges at the moment are incalculable. There are no error message for invalid UI scripts, so it might be very hard, for now, to figure out why your scripts don't work.

# Recent activity

Commits by Virgil Dupras were pushed to hsoft/xibless

4d61bb0 - Added TextField.usesSingleLineMode and set cell.scrollable to True by default (like IB does).
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.