TestsTested | ✓ |
LangLanguage | CC |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Jonathan Crooke.
Allow NULL
parameters to CGRectDivide()
. Avoid unnecessary local variables when slicing.
Are you tired of writing:
CGRect source = someView.frame;
CGRect slice = CGRectZero;
CGRectDivide(source, &source, &slice, 10, CGRectMinXEdge);
...when all you need to do is slice the original frame? Well how about:
CGRect source = someView.frame;
CGRectDivideNull(source, &source, NULL, 10, CGRectMinXEdge);
...or:
CGRect source = someView.frame;
CGRectDivideNull(source, NULL, &source, 10, CGRectMinXEdge);
Well now you can. Just a convenience wrapper for CGRectDivide()
that allows either the slice
or remainder
parameters to be NULL
. This prevents you from having to declare local variables just to satisfy this limitation on CGRectDivide()
when you don't need to use those slices.
That is all!
v0.0.2
v0.0.1