1、设置navbar触摸事件
2、tableview返回顶部
- (void)viewDidLoad { [super viewDidLoad]; self.navigationController.navigationBar.userInteractionEnabled=YES; UITapGestureRecognizer * tap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(scrollToTop:)]; [self.navigationController.navigationBar addGestureRecognizer:tap];}-(void)scrollToTop:(UITapGestureRecognizer *)sender{ [self.tableView setContentOffset:CGPointMake(0,-50) animated:YES];}