Swift UITextField常用方法
let textfiled = UITextField();
textfiled.frame = CGRect.init(x:100,y:250,width:160,height:30);
textfiled.borderStyle = UITextBorderStyle.roundedRect;
textfiled.placeholder = "请输入用户名";
textfiled.adjustsFontSizeToFitWidth = true;
textfiled.minimumFontSize = 1;
textfiled.textAlignment = .right;
textfiled.contentVerticalAlignment = .bottom;
textfiled.borderStyle = .none;
textfiled.background = UIImage(named:"");
self.view.addSubview(textfiled);
详细代码查看:https://github.com/xiaolitou-ping/Swift-All