Designated Initializer of UITextView

It seems as though the only initializer that works for now is:

super.init(frame: CGRect, textContainer: NSTextContainer?)

which can be called with

super.init(frame: CGRect.zero, textContainer: nil)

This is most likely a bug in the initial beta release and will be fixed in upcoming beta releases.


For 2020:

class SpecialText: UITextView {
    
    override init(frame: CGRect, textContainer: NSTextContainer?) {
        super.init(frame: frame, textContainer: textContainer)
        common()
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        common()
    }
    
    private func common() {
        backgroundColor = .yellow
        font = .systemFont(ofSize: 26)
        textColor = .green
    }
}