|
|
@ -454,14 +454,31 @@ extension ExchangeRatesViewController: FetchCountryCurrencyInformation, getExcha |
|
|
|
|
|
|
|
|
|
|
|
extension ExchangeRatesViewController: UITextFieldDelegate { |
|
|
|
func textFieldDidEndEditing(_ textField: UITextField) { |
|
|
|
// self.view.endEditing(true) |
|
|
|
DispatchQueue.main.async { |
|
|
|
textField.resignFirstResponder() |
|
|
|
|
|
|
|
func textFieldDidBeginEditing(_ textField: UITextField) { |
|
|
|
if textField == senderTextField { |
|
|
|
if Utility.getDeviceModel() == .iphone678 || Utility.getDeviceModel() == .iphone5 { |
|
|
|
let transformDistance: CGFloat = -75 |
|
|
|
UIView.animate(withDuration: 0.33) { |
|
|
|
self.view.transform = CGAffineTransform.init(translationX: 0, y: transformDistance) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func textFieldDidEndEditing(_ textField: UITextField) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if textField == senderTextField { |
|
|
|
UIView.animate(withDuration: 0.22, animations: { |
|
|
|
self.view.transform = CGAffineTransform.identity |
|
|
|
}) { (_) in |
|
|
|
self.calculateExchangeRate(nil) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|