A utility for converting .storyboard and .xib XML files into Swift model representations.
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.
From file url:
letfile=tryStoryboardFile(url: fileURL)From string content:
letparser=InterfaceBuilderParser()letstoryboardDocument=try parser.parseStoryboard(xml:"<?xml ... ")iflet scenes = file.document.scenes {forscenein scenes {..}}iflet resources = file.document.resources {forresourcein resources {
resource.resource // .. `NamedColor`, Ìmage
}}From file url:
letfile=tryXibFile(url: fileURL)From string content:
letparser=InterfaceBuilderParser()letxibDocument=try parser.parseXib(xml:"<?xml ... ")