Skip to content

Instantly share code, notes, and snippets.

@AndreyPanov
Created April 28, 2017 11:45
Show Gist options
  • Save AndreyPanov/72ace66f061ec217907719858ae8a85b to your computer and use it in GitHub Desktop.
Save AndreyPanov/72ace66f061ec217907719858ae8a85b to your computer and use it in GitHub Desktop.
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