TPKeyboardAvoiding icon indicating copy to clipboard operation
TPKeyboardAvoiding copied to clipboard

Need method to ajutst offset whent textView or textfiled has inputAccessoryView !!

Open ZXSGG opened this issue 8 years ago • 2 comments

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

ZXSGG avatar Sep 22 '16 06:09 ZXSGG

too

akerdi avatar Aug 26 '17 02:08 akerdi

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);
    }
}

AzamRahmat avatar May 13 '19 09:05 AzamRahmat