开发者

Start UIGestureRecognizer from Code

开发者 https://www.devze.com 2023-03-31 04:03 出处:网络
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 th

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号