how to know indexpath of UITableView.visibleCells?

NSArray * arrayOfVisibleTVC=[BNUtilitiesQuick ListController].tableViewA.visibleCells;
NSLog(@"array : %@", arrayOfVisibleTVC);

will display

"<UITableViewCell: 0x76c22a0; frame = (0 0; 320 75); autoresize = W; layer = <CALayer: 0x76bf770>>",
"<UITableViewCell: 0x76cfec0; frame = (0 75; 320 75); autoresize = W; layer = <CALayer: 0x769d260>>",
"<UITableViewCell: 0xe245f70; frame = (0 150; 320 75); autoresize = W; layer = <CALayer: 0xe245ed0>>",
"<UITableViewCell: 0xe248980; frame = (0 225; 320 75); autoresize = W; layer = <CALayer: 0xe2488c0>>",
"<UITableViewCell: 0xe24afa0; frame = (0 300; 320 75); autoresize = W; layer = <CALayer: 0xe24aee0>>"

and with this

UITableViewCell * lastObjectOfArray=arrayOfVisibleTVC.lastObject;
int indexpathLastObject= (lastObjectOfArray.frame.origin.y/new.frame.size.height);

I know the last of arrayOfVisibleTVC.lastObject that I use to get indexpath. but I think there is an another way to get indexpath of TableViewcell that showed.. any one can help me?

so I can get indexpath of cell as integer

Answers


Here is method in UITableView class:

- (NSArray *)indexPathsForVisibleRows

Need Your Help

Saving a Json extraction in Lift

json scala lift

I'm trying to save data parced with Lifts' Json data extraction and save it to the database(via mapper) but I cannot find where to connect the snippit to the mapper. The code looks like this.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.