UITableViewController not scrolling view when keyboard appears

前端 未结 4 1629
南旧
南旧 2020-12-14 10:17

I have a UITableViewController with around 20 static cells, some of these cells have UITextFields within them and some are just for selecting with

4条回答
  •  青春惊慌失措
    2020-12-14 11:00

    I ran into this issue myself. I just converted my view controller from a UIViewController to a UITableViewController in addition to adding the [super viewWillAppear:animated]; call, you will need to remove these lines:

    [self.tableView setDataSource:self]; [self.tableView setDelegate:self];

    As they are no longer needed and setDelegate interferes with the keyboard scrolling behavior.

提交回复
热议问题