开发者

How do I get the section index for a row index in objective-c and UITableView

开发者 https://www.devze.com 2023-01-24 20:27 出处:网络
I want to select a given row in the UTTableView from a index but need to know also the section index.

I want to select a given row in the UTTableView from a index but need to know also the section index.

 int localCurrentIndexPath = 9;

 NSIndexPath *scrollIndexPath = [NSIndexPath indexPathForRow:localCurrentIndexPath inSect开发者_运维知识库ion:??];

I need fill in the inSection part. Do I need to supply the inSection value?


Yes. If you only have 1 section, then use 0.

0

精彩评论

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