Table View scroll when text field begin editing iphone

前端 未结 3 1521
-上瘾入骨i
-上瘾入骨i 2021-01-17 04:51

I have table view controller in iphone application. Table view has two sections. First section has two rows and second section has one row. Second section has a custom table

3条回答
  •  感动是毒
    2021-01-17 05:44

    You want to use the setContentOffset method of the table view. Determine the magnitude of the vertical scroll (in pixels), and then:

    CGFloat verticalScroll = ... your code here ...
    [self.tableView setContentOffset:CGPointMake(0, verticalScroll) animated:YES];
    

提交回复
热议问题