[IOS]tableview----NSIndexPath

NSIndexPath has many uses, through which you can get the specific row of the tableview. And there are many APIs that need to be passed in.

 

NSIndexPath *temp = [NSIndexPath indexPathForRow:_selectRow inSection:0];

 Through this method, you can get the NSIndexPath of the row by passing in a specific row.

UITableViewCell *checkCell = [tableView cellForRowAtIndexPath:temp];

In this way, you can get the cell of the row (_selectRow)

 

 

NSIndexPath *myIndex = [_wifi_detali_tableView indexPathForCell:(UITableViewCell*)fooCell];

 In this way, you can get the NSIndexPath of the row where the cell is located by passing in a cell.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326067651&siteId=291194637