Last active
August 29, 2015 14:06
-
-
Save PiersonBro/26e0ee63569d31fdc157 to your computer and use it in GitHub Desktop.
Opting Out Of 'Required' Initializers in Swift
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
import Foundation | |
import UIKit | |
class OptOut: UIView { | |
let magicConstant: Int | |
override init(frame: CGRect) { | |
magicConstant = 0 | |
super.init(frame: frame) | |
} | |
required init(coder aDecoder: NSCoder) { | |
fatalError("Calling an Unsupported Intializer.") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment