iOS经典讲解之UITableView 去掉底部多余的行和分割线

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Loving_iOS/article/details/69525415
作者:刘新林

转载请标明出处:http://blog.csdn.net/loving_ios/article/details/69525415



设置tableView的style为UITableViewStyleGrouped时不会出现这种情况,当设为UITableViewStylePlain 时tableView的底部会出现多余的行和分割线,

解决方法:
在viewDidLoad函数中加上此句代码:
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]或者[UIView new];
即可去除UITableView底部多余行及分割线

猜你喜欢

转载自blog.csdn.net/Loving_iOS/article/details/69525415