user4951
user4951

Reputation: 33080

how to know tableview size xcode iphone?

- (double) tableSize
{
    double tableSize1=[self tableView:tableViewA numberOfRowsInSection:0]*tableViewA.rowHeight;
    return tableSize1;
}

I use that code to know tablesize, but I want to know easier way to know it.. like tableviewA.size or something like that..

example : tableviewA have 20 tableviewcell, I want to know the tableviewA size.. how to know it?

If I do tableViewA.frame.size.height it'll always show 400, which is the height of the table frame, because that's the size of the table view. I want the size of the whole table including those I need to scroll. –

For example, if the tableviewA has lots of rows then I want to see a high number

Upvotes: 1

Views: 3327

Answers (2)

kai
kai

Reputation: 149

this help?

tableView.frame.size.height

or

tableView.frame.size.width

then may be you can use

CGSize tableViewContentSize = tableView.contentSize;

to get the content size.

then to get the height and width just

tableViewContentSize.height
tableViewContentSize.width

Upvotes: 1

Srikar Appalaraju
Srikar Appalaraju

Reputation: 73608

You can use this - tableView.contentSize.height

Upvotes: 3

Related Questions