您的位置:首页 > 产品设计 > UI/UE

UITableView

2016-04-25 12:25 447 查看

footerView

今天遇到一个奇怪的现象,就是我自定义了一个UIView用作footerView,然后往里面放了一个button,然后设置self.tableView.tableFooterView = footer;但是却怎么都显示不出来。后来我就利用代理方法直接返回一个button就好了。其中原因还不是很清楚。

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
UIButton *footer = [UIButton buttonWithType:UIButtonTypeCustom];
footer.backgroundColor = [UIColor yellowColor];
[footer setImage:[UIImage imageNamed:@"add_project"] forState:UIControlStateNormal];
footer.frame = CGRectMake(0, 0, self.tableView.width, 40);
return footer;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: