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
Write the code in viewDidLoad()
and implement delegate UITextFieldDelegate
let _textField: UITextField = UITextField(frame: CGRect(x: 0, y: 0, width: 200.00, height: 40.00))
_textField.backgroundColor = UIColor.redColor()
_textField.text = "some string"
_textField.delegate = self
_textField.borderStyle = UITextBorderStyle.Line
self.view.addSubview(_textField)