简体   繁体   中英

UITableView does not scroll when keyboard appears

UITableView does not auto-scroll when a UITextField/UITextView becomes the first responder. It used to work just fine on iOS 9-11, but now it doesn't work anymore on iOS 12.
What should I set up or change in the tableView to fix the behavior?

Reference GIF

在此输入图像描述

I found solution in the code, as you said. This part of code was blame:

if #available(iOS 11.0, *) {
    tableView.contentInsetAdjustmentBehavior = .never
} else {
    automaticallyAdjustsScrollViewInsets = false
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM