The documentation says that the clipsToBounds
property of UIView
will clip the drawing to the bounds, or more precisely that the subView
can't draw outside of the bounds of the superView
.
Sounds nice, but what does that mean in practice?
If I set that to YES, then my subView
will automatically only draw those parts which are not outside the bounds of the superView
. so it increases the overall performance or do I still have to make sure that I don't create any views that are not visible, i.e. inside a UIScrollView
?
I think it's the opposite: turning on clipping hurts performance because it has to set up a clipping mask. I vaguely remember reading this somewhere, but I can't find it now.
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