开发者

On Collision Display Animation Code? (iPhone)

开发者 https://www.devze.com 2022-12-25 18:03 出处:网络
This is for iPhone 开发者_如何转开发Developers. What would be the code for an event handler? For my project I want it so that on collision display an animation for 3 seconds....How would I go around d

This is for iPhone 开发者_如何转开发Developers. What would be the code for an event handler? For my project I want it so that on collision display an animation for 3 seconds....How would I go around doing this?


Although you've provided almost no information about the context in which this activity is occurring, I will take a shot in the dark. If you are working with NSView's, you can use the

- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event

and/or

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event

methods for a primitive collision detection algorithm.

0

精彩评论

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