How to get number of rows in NSIndexPath section

Pedro picture Pedro · Sep 4, 2012 · Viewed 11.9k times · Source

I want to get the number of rows in an NSIndexPath section. For all my searching here & in Apple's docs I can't find how to get this value. Any clues on it?

My specific purpose is to use that to determine whether or not the selected row is the last row in the section so if anyone has a suggestion for determining that by another means that would be as good.

Answer

Inder Kumar Rathore picture Inder Kumar Rathore · Sep 4, 2012

Everything is in docs

numberOfRowsInSection:

int rows = [table numberOfRowsInSection:indexPath.section];