Open ZXSGG opened 8 years ago
too
try this. func textFieldDidEndEditing(_ textField: UITextField, reason: UITextFieldDidEndEditingReason) {
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1){[weak self] in
self?.scrollView.contentInset = UIEdgeInsetsMake(0.0, 0.0, 0.0, 0.0);
}
}
I have an issue when set textView a specify size ,eg.size(320, 60), and set textView.inputAccessoryView ,when user input text more than the content ,the textView will scroll but can not scroll bottom ,some text will be interrupt by the inputAccessoryView。 so it wil be appreciate ajust the content offset when the textView or textfield has set its inputAccessoryView