1.拖动TableView时收起键盘
self.tableView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
2.TableView不显示多余的部分表格
self.tableView.tableFooterView = [UIView new];
3.增加下拉刷新操作
- (void)viewDidLoad {
UIRefreshControl *rc = [[UIRefreshControl alloc]init];
rc.attributedTitle = [[NSAttributedString alloc]initWithString:@"下拉刷新"];
[rcaddTarget:self action:@selector(refreshTableView)forControlEvents:UIControlEventValueChanged];
self.refreshControl = rc;
}
-(void)refreshTableView{
self.refreshControl.attributedTitle=[[NSAttributedString alloc]initWithString:@"加载中....."];
[self.refreshControl endRefreshing];
self.refreshControl.attributedTitle = [[NSAttributedString alloc]initWithString:@"下拉刷新"];
[self.tableView reloadData];
}