0

我有一个UITableView来显示一些元素,当我点击每个单元格时,我可以看到它的detailViewController。我想从一个detailViewController传递到下一个,使UISwipeGestureRecognizer向左,如果我使UISwipeGestureRecognizer向右,返回tableView。uiswipegesturerecognizer通过UITableview的详细视图IOS

谢谢

+0

纠正我,如果即时通讯错误,但UITableViewCell没有详细信息视图,但细节文本标签 –

+0

不,对不起。我的意思是当我点击每个项目时,我可以看到一个新的DetailViewController – roxeman3

回答

0

添加刷卡识别到您的视图或实现代码如下

UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(goToNextView)]; 

    [swipeLeft setDirection:UISwipeGestureRecognizerDirectionLeft]; 
    [self.view addGestureRecognizer:swipeLeft]; //Add to the view or tableview or whatever 

添加方法

- (void)goToNextView 
{ 
    YourViewController *vc = 
    [self.storyboard instantiateViewControllerWithIdentifier:@"yourViewControllerIdendifier"]; 
    [self.navigationController pushViewController:vc animated:YES]; 
} 

做同样的回去,而是用推的,使用弹出

相关问题