I\'m new to Swift and iOS programming. I was trying to create a UITextField
programmatically using Swift but couldn\'t get it quite right. Also how do you change it
Make sure you're in the viewDidLoad() and then simply add the following code to produce a textField:
let myTextField: UITextField = UITextField(frame: CGRect(x: 0, y: 0, width: 200.00, height: 40.00));
self.view.addSubview(myTextField)
myTextField.backgroundColor = UIColor.redColor()
myTextField.text = "some string"
myTextField.borderStyle = UITextBorderStyle.Line