zoukankan      html  css  js  c++  java
  • UIPanGestureRecognizer

    UIPanGestureRecognizer *recognizer = [[[UIPanGestureRecognizer alloc]initWithTarget:self
                                                                                     action:@selector(paningGestureReceive:)]autorelease];
        [recognizer delaysTouchesBegan];
        [self.view addGestureRecognizer:recognizer];
    
    
    - (void)paningGestureReceive:(UIPanGestureRecognizer *)recoginzer
    {
        NSLog(@"paniiii");
        if(self.navigationController.viewControllers.count <=1 )
        {
            return;
        }
        CGPoint point = [recoginzer translationInView:self.view];
        NSLog(@"%f,%f",point.x,point.y);
    
        if(recoginzer.state == UIGestureRecognizerStateBegan)
        {
           
        }
         self.view.frame = CGRectMake(point.x, point.y, self.view.frame.size.width, self.view.frame.size.height);
    }
  • 相关阅读:
    Redis 补充
    python 魔法方法补充(__setattr__,__getattr__,__getattribute__)
    Mongodb 补充
    Mysql补充
    HTML
    优秀工具
    优秀文章收藏
    MySQL
    爬虫
    Python
  • 原文地址:https://www.cnblogs.com/qingjoin/p/3152948.html
Copyright © 2011-2022 走看看