UIView Disappears after pan gesture
Posted
by
JulianF
on Stack Overflow
See other posts from Stack Overflow
or by JulianF
Published on 2010-12-26T01:45:49Z
Indexed on
2010/12/26
1:54 UTC
Read the original article
Hit count: 695
ipad
|uigesturerecognizer
I am using the following handler for a IUPanGesture. However when the pan ends, the UIView that it is moving disappears. Do I need to add anything else to this code?
- (void)pan:(UIPanGestureRecognizer *)gesture
{
if ((gesture.state == UIGestureRecognizerStateChanged) ||
(gesture.state == UIGestureRecognizerStateEnded)) {
CGPoint location = [gesture locationInView:[self superview]];
[self setCenter:location];
}
}
© Stack Overflow or respective owner