Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tanner-west/59bbcf39d94ca78bef6a7d12f9fa8a52 to your computer and use it in GitHub Desktop.
Save tanner-west/59bbcf39d94ca78bef6a7d12f9fa8a52 to your computer and use it in GitHub Desktop.
//
// TextViewProvider.swift
// SwiftViewSchool
//
// Created by Tanner West on 8/16/23.
//
import Foundation
import UIKit
@objc class TextViewProvider: 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() {
text = "Hello, from Swift World!"
font = .systemFont(ofSize: 48)
textColor = .blue
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment