在我的项目中有一个界面有两个tableView, 其它的像scrollView, collectionView都没有, 设置好了相应的scrollsToTop怎么都无效.
这是我的代码
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 45 * ScaleHeight, Width, Height - 64 - 45 * ScaleHeight) style:UITableViewStylePlain];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.backgroundColor = [UIColor colorWithRed:0.94 green:0.95 blue:0.95 alpha:1.00];
_tableView.scrollsToTop = YES;
[self.view addSubview:_tableView];
_tableView.tableFooterView = [[UITableView alloc] init]; // 注意这句话
_screenTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 20, _screenView.frame.size.width, Height - 20 - 40 * ScaleHeight) style:UITableViewStylePlain];
_screenTableView.delegate = self;
_screenTableView.dataSource = self