Storytime是一个解析和展示Interface Builder Storyboard文件的框架

网友投稿 632 2022-10-31

Storytime是一个解析和展示Interface Builder Storyboard文件的框架

Storytime是一个解析和展示Interface Builder Storyboard文件的框架

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 workingVarious rendering issuesCSS coupled with HTML templateetc.

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 :)

Acknowledgement

RatchetTouchXML

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Sceneform是一个3D框架,具有基于物理的渲染器
下一篇:Bash Infinity是bash的一个现代的样板/框架/标准库
相关文章

 发表评论

暂时没有评论,来抢沙发吧~