问题
I want to add a view after the last cell of tableview. I need to define the frame for it. If I want to add something before the first cell, then I can set the frame as
refreshHeaderView = [[EGORefreshTableHeaderView alloc] initWithFrame:CGRectMake(0.0f, 0.0f - self.view.bounds.size.height,320.0f, self.view.bounds.size.height)];
But how to find the y coordinate of the frame of view to be set after the last cell.
Thanx in advance.
回答1:
The tableview subclasses scrollView, so, to answer your question, you can use contentSize, however, can you use the footerView to achieve what you want anyway ?
回答2:
Use the code:
refreshHeaderView = [[EGORefreshTableHeaderView alloc] initWithFrame:CGRectMake(0.0f, self.tableView.contentSize.height, 320.0f, self.tableView.bounds.size.height)];
来源:https://stackoverflow.com/questions/2912217/reach-the-end-of-the-tableview-without-using-numberofrowsinsection-delegate-me