- 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

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -