简体   繁体   中英

Can any one tell me these gesture name's in iOS . Any good example code will be helpful

kindly tell me which gesture they are using in my given screen shoot. If there is any example code or similar to this example then please tell me. I search over google with more than 15 different queries but did find any example like this .

As you can see they are not using a full page swipe but half.

Please check these two screen shoots

http://i58.tinypic.com/zna0zc.png

http://i61.tinypic.com/28k4o7q.png

Thanks

似乎有一个基于touchesBegan:touchesMoved:方法的低级手势工作。

Just Create A UITapGesture like this

   UITapGestureRecognizer  *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapFrom:)];

And Do Something here For Hide According You ...

 - (void) handleTapFrom: (UITapGestureRecognizer *)recognizer
   {
     //Code to handle the gesture
  } 

Could be everything:

  • a simple button that trigger a slide up animation
  • if you can drag it and it stays attached to the finger is a pan Gesture recognizer
  • if the movement is a swipe, it is a swipe gesture recognizer

You can use simple view animation for the same.

-(IBAction)tabPressed:(id)sender
   {
     if([sender isSelected])
     {
             sender.selected=NO;
             [UIView beginAnimations:@"animation" context:NULL];
                [UIView setAnimationDuration:0.5];
               //set here frame to go down
                [UIView commitAnimations];
    }
    else
    {
    sender.selected=YES;
             [UIView beginAnimations:@"animation" context:NULL];
                [UIView setAnimationDuration:0.5];
               //set here frame to go up
                [UIView commitAnimations];
    }
  }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM