Skip to content

Instantly share code, notes, and snippets.

@berzniz
Created May 4, 2012 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save berzniz/2594243 to your computer and use it in GitHub Desktop.
Save berzniz/2594243 to your computer and use it in GitHub Desktop.
With booleans
BOOL viewAcontainsViewB = (viewA.origin.y < viewB.origin.y) && (viewB.origin.y + viewB.size.height < viewA.origin.y + viewA.size.height);
if (viewAcontainsViewB) {
[self doSomething];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment