如何隐藏UITableView中底部多余的空白行
2015-09-08 16:50
441 查看
我是通过 storyboard 创建的tableview ,只需要outlet下 然后给 tableview的tablefooterview设置一个uivew就行了 ,上代码
@interface MainViewController ()
@property NSArray *receps;
@property (strong, nonatomic) IBOutlet UITableView *mainTableView;
@end
@implementation MainViewController
<img src="https://img-blog.csdn.net/20150908165447173?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
- (void)viewDidLoad {
[super viewDidLoad];
_receps = [NSArray arrayWithObjects: @"one",@"two",@"three",@"four",@"five",@"six",@"seven",@"eight",@"nine",@"ten",nil];
<span style="color:#FF0000;">_mainTableView.tableFooterView = [[UIView alloc] init];</span>
}
@interface MainViewController ()
@property NSArray *receps;
@property (strong, nonatomic) IBOutlet UITableView *mainTableView;
@end
@implementation MainViewController
<img src="https://img-blog.csdn.net/20150908165447173?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
- (void)viewDidLoad {
[super viewDidLoad];
_receps = [NSArray arrayWithObjects: @"one",@"two",@"three",@"four",@"five",@"six",@"seven",@"eight",@"nine",@"ten",nil];
<span style="color:#FF0000;">_mainTableView.tableFooterView = [[UIView alloc] init];</span>
}
相关文章推荐
- DuiLib响应按钮事件
- DuiLib响应按钮事件
- easyUI的行内编辑editor
- iOS UIActivityIndicatorView
- UI 设计师提供 iOS 字体和长度应当用什么单位
- UITableViewCell与cell之间的那条线
- StringBuilder与StringBuffer的区别(转)
- easyUI中的datagrid的formatter方法中 使用$.ajax()方法绑定多个不同数据源的数据
- DelayQueue Demo
- NYOJ 686 An Interesting Sequence 【欧拉函数】
- 十大滤波算法程序大全(Arduino精编无错版)(转)
- The server quit without updating PID file (/var/run/mysqld/mysqld.pid). ...
- Reinstall the Arduino Pro Mini Bootloade ISP(转)
- Arduino中hex文件的保存及应用(转)
- Arduino单片机使用和开发问题记录(转)
- UDK: Lightmap UV Layout Techniques & How to Create a Second UV Channel in Maya
- UILabel根据内容自动调整高度
- leetCode #96 Unique Binary Search Trees
- arm交叉编译器gnueabi、none-eabi、arm-eabi、gnueabihf、gnueabi区别
- 更改UIImage颜色