How to Create Custom Text files in swift iOS
Copy and paste this code for Custom IUTextFiled import Foundation import UIKit class HGTextFiled : UITextField, UITextFieldDelegate { var textCapitalType : UITextAutocapitalizationType = .none{ didSet{ self.autocapitalizationType = textCapitalType } } override init(frame: CGRect) { super.init(frame: CGRect.zero) self.setUp() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.setUp() } override func awakeFromNib() { super.awakeFromNib() self.setUp() } fileprivate func setUp() { self.textColor = COLOR.textFiled self.font = UIFont.init(name: FontName.SemiBold, size: FontSize.Small_12 + 1) self.backgroundColor = COLOR.White } var image : UIImage? var selectedImage : UIImage? var imageView : UIImageView? var maxLenght = Int() func setKeyboard(keyboardType:UIKeyboardType = .default, r