Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 2 UIImageView。冷杉可以由用户移动,并且必须被拖到另一个中。我必须检测第一个图像视图何时“进入”另一个。我怎样才能做到这一点?
UIImageView
只需控制框架是否UIImageView相互包含。
UIImageView * a; UIImageView * b; if (CGRectContainsRect(a.frame, b.frame)) { NSLog(@"a is over b"); }