Skip to content

Instantly share code, notes, and snippets.

@rowanj
Created August 15, 2013 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rowanj/6237659 to your computer and use it in GitHub Desktop.
Save rowanj/6237659 to your computer and use it in GitHub Desktop.
XIB and Interface Builder replacement
{
"controller": "GalleryViewController",
"name": "background",
"color": {
"red": 0.16862745098039,
"green": 0.16862745098039,
"blue": 0.16862745098039
},
"subviews": [
{
"name": "wrapper",
"layout": "RibLayoutFill",
"subviews": [
{
"layout": "RibLayoutGallery",
"subviews": [
{
"name": "title area",
"size": {
"height": "40"
},
"layout": "RibLayoutFill",
"subviews": [
{
"name": "title container",
"layout": "RibLayoutCenter",
"subviews": [
{
"name": "title image",
"class": "RibImageView",
"image": "Finder-Title.png"
}
]
},
{
"name": "right button container",
"layout": "RibLayoutRight",
"subviews": [
{
"name": "add button",
"size": {
"width": 40,
"height": 40
}
}
]
}
]
},
{
"name": "content area",
"layout": "GalleryItemLayout"
}
]
}
]
}
]
}
Rib *galleryRib = [Rib bundledRib:@"GalleryView"];
GalleryViewController *result = galleryRib.controller;
UIView *galleryRootView = galleryRib.view; // or result.view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment