Skip to content

Repository files navigation

StoryboardDecoder

A utility for converting .storyboard and .xib XML files into Swift model representations.

Project Background

Originally forked from IBDecodable/IBDecodable 0.6.1 to continue development independently due to inactivity in the source repository. The repository and framework were renamed to StoryboardDecoder.

Parse Storyboard

From file url:

letfile=tryStoryboardFile(url: fileURL)

From string content:

letparser=InterfaceBuilderParser()letstoryboardDocument=try parser.parseStoryboard(xml:"<?xml ... ")

Browse the storyboard scene

iflet scenes = file.document.scenes {forscenein scenes {..}}

Get the storyboard resources

iflet resources = file.document.resources {forresourcein resources {
resource.resource // .. `NamedColor`, Ìmage
}}

Parse Xib

From file url:

letfile=tryXibFile(url: fileURL)

From string content:

letparser=InterfaceBuilderParser()letxibDocument=try parser.parseXib(xml:"<?xml ... ")

About

No description or website provided.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages