@property (nonatomic, assign) Home *VC;
-(void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
{
NSUInteger indexOfTab = [[tabBar items] indexOfObject:item];
NSLog(@"%lu",(unsigned long)indexOfTab);
UITableView *tableView = self.VC.tableView;
UIEdgeInsets tableInset = tableView.contentInset;
[tableView setContentOffset:CGPointMake(- tableInset.left, - tableInset.top) animated:YES];
}
NSLOG工作正常,但向上滚动tableView的逻辑根本没有被调用。