Created
April 28, 2017 11:45
-
-
Save AndreyPanov/72ace66f061ec217907719858ae8a85b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func applyStyle() { | |
StyleBuilder() | |
.guide() | |
.forEach { setStyle(with: $0) } | |
} | |
private func setStyle(with guide: Guide) { | |
switch guide { | |
case .headerLabel(let closure), | |
.bodyLabel(let closure): | |
perform(with: guide.identifier(), closure: closure) | |
case .loginTextField(let closure): | |
perform(with: guide.identifier(), closure: closure) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment