Clipstobounds
Refers to a child view on a view that is truncated if the portion of the parent view is exceeded.
Maskstobounds
is a sublayer on the layer of the view, which is truncated if the part of the parent layer is exceeded
When the Clipstobounds method is called, the Maskstobounds method of its layer is called:
1-(BOOL) [UIView (Rendering) clipstobounds]2+03091938a -Pushl%EBP3+13091938b 89e5 MOVL%esp,%EBP4+33091938d e800000000 calll0x309193925+8 30919392 -Popl%ecx6+9 309193938b4508 MOVL0x08(%EBP),%eax7+ A 309193968b5004 MOVL0x04(%EAX),%edx (calayer) _layer8+ the 309193998b8186cb1301 MOVL0x0113cb86(%ECX),%eax maskstobounds9+ +3091939f 89450c movl%eax,0x0c(%EBP)Ten+ -309193a2895508MOVL%edx,0x08(%EBP) One+ -309193a5 C9 Leave A+ -309193a6 e92e211801 Jmpl0x31a9b4d9
The difference and connection between Clipstobounds and Maskstobounds