I have created a regular UITextFiled as the following:
self.view.addSubview(userName) userName.translatesAutoresizingMaskIntoConstraints = fal