Merge pull request #115 from uhooi/feature/bump_swxmlhash_to_7 Bump SWXMLHash to 7.0.1
Merge pull request #115 from uhooi/feature/bump_swxmlhash_to_7
Bump SWXMLHash to 7.0.1
A tool to translate .xib and .storyboard XML into Swift models.
.xib
.storyboard
Simply add the following line to your Podfile:
pod 'IBDecodable'
To include IBDecodable into a Swift Package Manager package, add it to the dependencies attribute defined in your Package.swift file.
Package.swift
dependencies: [ .Package(url: "https://github.com/IBDecodable/IBDecodable.git", majorVersion: <majorVersion>, minor: <minor>) ]
From file url:
let file = try StoryboardFile(url: fileURL)
From string content:
let parser = InterfaceBuilderParser() let storyboardDocument = try parser.parseStoryboard(xml: "<?xml ... ")
if let scenes = file.document.scenes { for scene in scenes { .. } }
if let resources = file.document.resources { for resource in resources { resource.resource // .. `NamedColor`, Ìmage } }
let file = try XibFile(url: fileURL)
let parser = InterfaceBuilderParser() let xibDocument = try parser.parseXib(xml: "<?xml ... ")
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
IBDecodable
A tool to translate
.xib
and.storyboard
XML into Swift models.Installing
Using Cocoapods:
Simply add the following line to your Podfile:
Using Swift Package Manager:
To include IBDecodable into a Swift Package Manager package, add it to the dependencies attribute defined in your
Package.swift
file.Parse Storyboard
From file url:
From string content:
Browse the storyboard scene
Get the storyboard resources
Parse Xib
From file url:
From string content: