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; }
相关文章推荐
- UITextView的使用详解
- UINavigationController
- Android学习之 图解调用invalidate()和requestLayout()的过程
- 手写代码UI,xib和StoryBoard间的的优劣比较
- UE4 蓝图 实现 数组的边遍历边删除
- Android 项目 UI混乱,Button变大,解决方案
- 物联网开发- Arduino 101/Genuino 101
- 如何处理键盘遮挡UITextField
- IOS UIFont 字体大全
- 在UEFI模式下安装Ubuntu(一)——制作UEFI模式启动U盘
- using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
- 【SystemUI】修改下拉状态栏颜色
- HDU 5667 Sequence
- iOS中Xcode使用UIScrollView+AutoLayout轻松实现滚动布局
- iOS 通过UIDevice 获取系统相关属性
- 个性化 UIAlertController
- 【CodeForces 618B 】Guess the Permutation(水题)
- WM_CLOSE,WM_QUIT,WM_DESTROY消息的区别
- 解决StoryBoard上cell上定义的view的背景点击后不显示的问题(其中用uiview 当作线的时候最多遇到,会不显示线 而出现不流畅问题)
- UICollectionView 基础篇