 		text = phoneCode
 		sendActions(for: .editingChanged)
 	}
-}
-
-extension CTKFlagPhoneNumberTextField: CTKFlagPhoneNumberDelegate {
+
+	// CTKFlagPhoneNumberDelegate
+	
 	func didSelect(country: Country) {
 		if let code = country.code {
 			countryPicker.setCountry(code)

		}
		return [space, doneButton]
	}
}

extension CTKFlagPhoneNumberTextField: UITextFieldDelegate {

	public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
		if string == "" && text == phoneCode {
			return false

	public func textFieldDidEndEditing(_ textField: UITextField) {
		set(phoneNumber: textField.text!)
	}
	
	// CountryPickerDelegate

	public func countryPhoneCodePicker(_ picker: CountryPicker, didSelectCountryWithName name: String, countryCode: String, phoneCode: String, flag: UIImage) {
		self.phoneCode = phoneCode
		self.countryCode = countryCode
