In the following code, is it possible to get rid of nothing
variable?
CGRect startTableViewFrame;
CGRect nothing;
CGRectDivide(tableViewFrame,
¬hing,
&startTableViewFrame,
searchBarHeight - contentOffset,
CGRectMinYEdge);
NULL
doesn't seem to work. Any tips?
Thanks!
Well, you could do this
CGRectDivide(tableViewFrame,
&(CGRect){},
&startTableViewFrame,
searchBarHeight - contentOffset,
CGRectMinYEdge);
or even this:
MyCGRectDivide( CGRect r, CGRect * slice, CGRect * remainder, CGFloat d, CGRectEdge edge )
{
slice = slice ? slice : &(CGRect){} ;
remainder = remainder ? remainder : &(CGRect){} ;
CGRectDivide( r, slice, remainder, d, edge ) ;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With