开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜