I was trying to follow a tutorial on CoreText and how to draw the text, and I implemented this function in my customView.
override func draw(_ rect: CGRect) {