开发者

How can I resize a UITableView header?

self.headerView.frame = CGRectMake(0, 0, 320, 167); //this i开发者_Go百科s a UIView

doesnt seem to do anything. everything is hooked up in IB.


i need to call setHeaderView after defining the frame.


is this in a UITableViewController? if so, try accessing the tableHeaderView (self.tableView.headerTableView) and then getting the subview you want.


Try the UITableViewDelegate's -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section method.

Also, the -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section might also be of interest to you if you're trying to put a custom view as a header.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜