Skip to content

Instantly share code, notes, and snippets.

@vialyx
Created October 11, 2018 03:24
Show Gist options
  • Save vialyx/ef40abbc917f13c5788492d623c3c130 to your computer and use it in GitHub Desktop.
Save vialyx/ef40abbc917f13c5788492d623c3c130 to your computer and use it in GitHub Desktop.
class FullscreenButton: UIButton {
// Convenience initializer
convenience init(_ screen: UIScreen) {
// Reusing Designated initializer
self.init(frame: screen.bounds)
}
// Initializer overriding
override init(frame: CGRect) {
super.init(frame: frame)
}
// Required initializer
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment