Skip to content

Instantly share code, notes, and snippets.

@wwe-johndpope
Created May 8, 2017 15:10
Show Gist options
  • Save wwe-johndpope/a3ae24ac1b619104c7d21c449f07ba80 to your computer and use it in GitHub Desktop.
Save wwe-johndpope/a3ae24ac1b619104c7d21c449f07ba80 to your computer and use it in GitHub Desktop.
simple overloading functions
public struct IndicatorInfo {
public var title: String
public var image: UIImage?
public var highlightedImage: UIImage?
public init(title: String) {
self.title = title
}
public init(title: String, image: UIImage?) {
self.init(title: title)
self.image = image
}
public init(title: String, image: UIImage?, highlightedImage: UIImage?) {
self.init(title: title, image: image)
self.highlightedImage = highlightedImage
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment