Skip to content

Instantly share code, notes, and snippets.

@srdanrasic
Created December 9, 2017 21:20
Show Gist options
  • Select an option

  • Save srdanrasic/c1269baec6aa50dd9dc45c4b7b3cbc2c to your computer and use it in GitHub Desktop.

Select an option

Save srdanrasic/c1269baec6aa50dd9dc45c4b7b3cbc2c to your computer and use it in GitHub Desktop.
public struct Style<View: UIView> {
public let style: (View) -> Void
public init(_ style: @escaping (View) -> Void) {
self.style = style
}
public func apply(to view: View) {
style(view)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment