why is my UIView subview not rendering within the parent? (code attached) why is my UIView subview not rendering within the parent? (code attached) ios ios

why is my UIView subview not rendering within the parent? (code attached)


Check if the "Clip subviews" property of parent on the IB file is checked.

Clip Subviews

I think the equivalent code is self.view.clipsToBounds = YES.

if this is NO, subviews that draws outside will be visible as if it's drawn on the parent.