Let's say I create a view like this:
let myView = UIView(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
self.view.addSubview(myView)
How can I give that view a custom class and module like I would in IB?
I am either searching for the wrong thing, or no one has asked this question. I also haven't tried anything because I can't figure out where to even start.
Update:
This is what I mean by adding a class and module like you would in IB:

