Set padding in UITextField Swift


let view = UIView(frame: CGRect(x: 10, y: 0, width: 10, height: textfield.frame.height))
textfield.leftViewMode = UITextFieldViewMode.always;
textfield.leftView = view;