- Where Developers Learn, Share, & Build Careers
In my app the user can drag the top caller from the stack of CALayers.
When the user prevents dragging the CALayer, others should return to their original position at the top of the CALayers until the claire (after dragging) overlaps with other calendars It should be taken under the other calorie.
Now, how can I find out that two calories overlap?
CALayer's frame property is a CGRact. Fortunately for you, CGGomitry has the following method:
CgTTIntecpectors
You can use it like this:
if (CGRectIntersectsRect (MyLayer1.frame, MyLayer2.frame)) {// code}
Comments
Post a Comment