Start UIGestureRecognizer from Code
i got a UIViewSubclass Ball with a UIPanGestureRecognizer. If i drag the Ball above a other UIView (in UIGestureRecognizerStateChanged) the complete Superview gets cleared including the Ball. After that the Ball will be recreated.
My problem is that, with removing the ball naturally the UIGestureRecognizer ends recognizing.
How i can tell the gestureRecognizer of the new Ball to start recognize in code, cause my finger is still on the screen?
Thanks a lot开发者_JAVA技巧!
How are you clearing the superview including the ball? Are you removing it? If yes, then you could try making the ball invisible instead of removing it, by setting its alpha to 0.
精彩评论