I write too much of this code :
self.frame.origin.y + self.frame.size.height
Is there shortcut for this? Something like self.frame.y_plus_height
?
If there is, I'm not sure if that good news or bad news for all the times I wrote the full sentence.
This should do the trick:
CGFloat res = CGRectGetMaxY(self.frame);
Documentation can be found here.
EDIT: according to explanation from rob mayoff (see comments) this is a little more expensive than simply summing origin.y + size.height
in code.
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