UITableViewController accessing static cells programmatically issue

后端 未结 6 1449
孤独总比滥情好
孤独总比滥情好 2021-01-05 23:41

Say I have a table with 10 static cells in it, is there a way to select a certain cell programmatically?

I\'ve tried this

UITableViewCell *cell = [se         


        
6条回答
  •  无人及你
    2021-01-06 00:21

    If you need accessing the cell object, then using UITableViewCell method cellForRowAtIndexPath is quite appropriate.

    That may either just pass the cell, if it is visible, or call the delegate method cellForRowAtIndexPath (do not mix them up) which you should provide. If that one crashes then dig deeper and investigate the root cause of the crash.

提交回复
热议问题