What I want is something like
-(UIView*) fromPoint: (CGPoint) point inView:(UIView*) superView
Is something like this already present? I want it so that I can successfully swap contents of any two UIImageView
out of many if one is dragged and dropped on another.
One way of doing it is by checking for all the subviews if they contain the provided point. Is there any other way?
Thanks.
Doing a hitTest on a UIView will return its subview if the hit test is on a view in its hierarchy
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
event would be nil for what you want
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With