#import "LYEmptyViewHeader.h" //1 使用框架UI样式,直接调用 self.mainTableView.ly_emptyView = [LYEmptyView emptyViewWithImageStr:@"kongBai" titleStr:@"暂无数据,点击重新加载" detailStr:@""]; //emptyView内容上的点击事件监听 __weak typeof(self)weakSelf = self; [self.mainTableView.ly_emptyView setTapContentViewBlock:^(){ [weakSelf.mainTableView.mj_header beginRefreshing]; }];
https://github.com/dev-liyang/LYEmptyView