I have a UIViewController called LoginViewController. I want to build the view of that LoginViewController fully programmatically<
UIViewController
LoginViewController
You should load the custom view when LoginViewController's layout constraints are already loaded, try this:
override func viewDidLoad() { super.viewDidLoad() let newView = LoginView(frame: view.bounds) view.addSubview(newView) }