Sebastien
Sebastien

Reputation: 6660

Get the number of rows of a static table view

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?

Upvotes: 1

Views: 83

Answers (1)

MByD
MByD

Reputation: 137272

The best I know about is:

NSInteger rows = 0;
for (NSInteger i = 0; i < [myTable numberOfSections]; ++i)
{
    rows += [myTable numberOfRowsInSection:i];
}

Upvotes: 2

Related Questions