Select uitableview row programmatically

后端 未结 2 537
既然无缘
既然无缘 2021-02-08 01:48

i have read a lot on this argument, i have tested this example that works: source code example. but this doesn\'t use storyboards (i don\'t know if this is the reason that make

2条回答
  •  礼貌的吻别
    2021-02-08 02:01

    I tried to study your code downloading the project.The problem is that firstController.tableView is nil.
    So fix it:

    [firstTable selectRowAtIndexPath:indexPath 
                            animated:NO 
                      scrollPosition:UITableViewScrollPositionNone];
    

    Or assign firstController.tableView to the table view.

提交回复
热议问题