I'm using UISwipeGestureRecognizer
to slide my UIView
up the screen, but I can't figure out how to set its position so that it stays up at the top of the screen until i swipe it back down. Right now I can swipe it up, but it will fall back down right away. Should I be doing a transform instead of CGRectOffset
?
- (IBAction)handleSwipe:(UISwipeGestureRecognizer *)recognizer
{
if(recognizer.direction == UISwipeGestureRecognizerDirectionUp)
{
panedView.frame =CGRectOffset( panedView.frame, 0, -1*self.view.bounds.size.height);
}
}