1

I have a static table view, created using a storyboard. I want to get its number of rows in code. How can I do that?

4

1 に答える 1

2

The best I know about is:

NSInteger rows = 0;
for (NSInteger i = 0; i < [myTable numberOfSections]; ++i)
{
    rows += [myTable numberOfRowsInSection:i];
}
于 2012-04-30T19:03:52.960 に答える