 		set(phoneNumber: textField.text!)
 	}
 	
-
+	
 	// MRCountryPickerDelegate
 	
 	public func countryPhoneCodePicker(_ picker: MRCountryPicker, didSelectCountryWithName name: String, countryCode: String, phoneCode: String, flag: UIImage) {
 		self.phoneCode = phoneCode
 		self.countryCode = countryCode
-	
+		
 		flagButton.setImage(flag, for: .normal)
 		text = phoneCode
 		sendActions(for: .editingChanged)

}

public class CTKFlagPhoneNumberTextField: UITextField, UITextFieldDelegate, MRCountryPickerDelegate {

    private static let FlagSize = CGSize(width: 32, height: 32)
	
    public var flagButtonEdgeInsets: UIEdgeInsets = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 8) {
        didSet {
            self.layoutSubviews()
        }
    }
	private var flagButton: UIButton!
	private lazy var countryPicker: MRCountryPicker = MRCountryPicker()
	private lazy var phoneUtil: NBPhoneNumberUtil = NBPhoneNumberUtil()

		
		countryPicker.setCountry(Locale.current.regionCode!)
	}
	
	public override func layoutSubviews() {
		super.layoutSubviews()
		
		leftView?.frame = leftViewRect(forBounds: frame)
		flagButton.frame = CGRect(x: flagButtonEdgeInsets.left, y: flagButtonEdgeInsets.top, width: CTKFlagPhoneNumberTextField.FlagSize.width, height: CTKFlagPhoneNumberTextField.FlagSize.height)
	}
	
	public override var intrinsicContentSize: CGSize {
		var intrinsicContentSize = super.intrinsicContentSize
		let leftViewHeight = leftViewSize.height
		
		intrinsicContentSize.height = max(intrinsicContentSize.height, leftViewHeight)
		return intrinsicContentSize
	}
	
	private var leftViewSize: CGSize {
		return CGSize(
			width: CTKFlagPhoneNumberTextField.FlagSize.width + flagButtonEdgeInsets.left + flagButtonEdgeInsets.right,
			height: CTKFlagPhoneNumberTextField.FlagSize.height + flagButtonEdgeInsets.top + flagButtonEdgeInsets.bottom)
	}
	
	public override func leftViewRect(forBounds bounds: CGRect) -> CGRect {
		let width = min(bounds.size.width, leftViewSize.width)
		let height = min(bounds.size.height, leftViewSize.height)
		let rect = CGRect(x: 0, y: bounds.size.height / 2 - height / 2, width: width, height: height)
		
		return rect
	}
	
	public override func textRect(forBounds bounds: CGRect) -> CGRect {
		var textRect = super.textRect(forBounds: bounds)
		let spaceBetweenLeftViewAndText = textRect.minX - leftViewRect(forBounds: bounds).maxX
		
		if spaceBetweenLeftViewAndText > 0 {
			textRect.origin.x -= spaceBetweenLeftViewAndText
			textRect.size.width += spaceBetweenLeftViewAndText
		}
		return textRect
	}
	
	public override func editingRect(forBounds bounds: CGRect) -> CGRect {
		return textRect(forBounds: bounds)
	}
	
	public override func placeholderRect(forBounds bounds: CGRect) -> CGRect {
		return textRect(forBounds:bounds)
	}
	
	@objc private func displayNumberKeyBoard() {
		if inputView != nil {
