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"); }