码迷,mamicode.com
首页 > 其他好文 > 详细

左右手势的滑动,来切换页面

时间:2014-11-11 22:59:07      阅读:255      评论:0      收藏:0      [点我收藏+]

标签:action   左右   

    //向左滑动的时候的手势

    UISwipeGestureRecognizer *leftSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(presentRightMenuViewController:)];

    [leftSwipeGestureRecognizer setDirection:UISwipeGestureRecognizerDirectionLeft];

    [self.view addGestureRecognizer:leftSwipeGestureRecognizer ];


    //向右滑动时候的手势

    UISwipeGestureRecognizer *rithSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(presentRightMenuViewController:)];

    [rithSwipeGestureRecognizer setDirection:UISwipeGestureRecognizerDirectionRight];

    [self.view addGestureRecognizer:rithSwipeGestureRecognizer ];


- (void)presentRightMenuViewController:(UISwipeGestureRecognizer *)dddd

{

    [self.navigationController popViewControllerAnimated:YES];

}

那么问题来咯,现在返回上一个页面后,会崩溃,错误原因,  -------待结果

2014-11-11 21:33:18.907 LYF_video[7979:258930] *** -[UIImageView superview]: message sent to deallocated instance 0x7fb2f3ea8870


本文出自 “小刘_Blog” 博客,转载请与作者联系!

左右手势的滑动,来切换页面

标签:action   左右   

原文地址:http://liuyafang.blog.51cto.com/8837978/1575516

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!