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.
精彩评论