开发者

Assigning the value of selected row to a variable, iphone SDK

开发者 https://www.devze.com 2022-12-12 20:59 出处:网络
I want to assign the value of indexpath.rowof th开发者_如何学Goe row which is currently selected, to a variable, How to do that???Where (in what method) are you doing this?

I want to assign the value of indexpath.row of th开发者_如何学Goe row which is currently selected, to a variable, How to do that???


Where (in what method) are you doing this?

This is pretty typical in my table view controllers for table views that only have one section:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

 int row = indexPath.row;

 // code using "row" here

}

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号