maskstobounds专题

View Frame、bounds、clipsToBounds、masksToBounds

Frame:其位置坐标是相对于对于父view,  例如 view.frame为(100,100,200,50) bounds:其位置坐标是相对于自己,例如:view.bounds 为(0 , 0 , 200, 50) clipsToBounds:是类View的属性,如果设置为yes,则不显示超出父View的部分 masksToBounds:是类CALaye