Get UITableView to scroll to the selected UITextField and Avoid Being Hidden by Keyboard

后端 未结 13 974
鱼传尺愫
鱼传尺愫 2020-11-29 17:47

I have a UITextField in a table view on a UIViewController (not a UITableViewController). If the table view is on a UITableViewC

13条回答
  •  無奈伤痛
    2020-11-29 18:13

    Try my coding, this will help for ypu

    tabelview.contentInset =  UIEdgeInsetsMake(0, 0, 210, 0);
    [tableview scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:your_indexnumber inSection:Your_section]
                     atScrollPosition:UITableViewScrollPositionMiddle animated:NO];
    

提交回复
热议问题