Storytime
Storytime is a framework to parse and render Interface Builder Storyboard files. Support for more components and output formats soon.
By Jorge Cohen, See the LICENSE file for license info (it's the MIT license).
If you find this useful please consider buying me a beer :)
Motivation
If you've ever developed for iOS/macOS you've probably tried to QuickLook into a storyboard file only to be disappointed. I've created Storytime as a way to visually display storyboards outside of Interface Builder, This could be QuickLook, Git Client, etc.
Internals
Storyboards a actually very simple XML files so parsing them is pretty stright forward. Initially I tried using XSLT to transform the Storyboard into HTML but ran into some issues.
This version parses the storyboard into classes conforming to a protocol STTElement
which defines the -htmlRepesentation
method.
Using the Ratchet CSS framework and the html produced by the various elements you get a pretty (although not 100%) accurate visual representation of the storyboard.
Known Issues
There are a lot of them!
- Views (
-htmlRepresentation
) are coupled with the models (STTElement
) which is due to me being in a hurry to get this working - Various rendering issues
- CSS coupled with HTML template
- etc.
Feel free to create issues when you find them.
Questions
Why Objective-C?
It's what I like using, also, it's required if you want to create a QuickLook generator.
Why is the code like this?
Well, this started out as a quick hack and I got excited when things first started showing up so I wanted to release it as fast as possible :)