Just create an instance instead UIView.
Assuming this is your custom view:
class MyCustomView: UIView {
}
Here's how to do it:
let myView = MyCustomView(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
self.view.addSubview(myView)
- , class MyCustomView: UIView.... iOS ( ) . " " Xcodes Inspector :
