how to get title of of row selected in UITableview

后端 未结 5 630
孤独总比滥情好
孤独总比滥情好 2021-02-04 03:44

I have tableview with some names on each cell , how can i get that name when select row ?

i know that i have to use delegate method

-(void)tableView:(         


        
5条回答
  •  心在旅途
    2021-02-04 04:22

    you can access each row of your uitabelview using the following (uitableview-)function:

    cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]
    

    by the way, to access your tableview in other methods than uitableview's delegate method, you have to hook it up in IB (for example..)

    hope it helps

提交回复
热议问题