- 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

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -