-(void)layoutSubviews
{
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, ScreenWidth-34, 1000) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(8, 8)];
CAShapeLayer*maskLayer = [[CAShapeLayeralloc]init];
maskLayer.frame=self.imagesView.bounds;
maskLayer.path= maskPath.CGPath;
self.imagesView.layer.mask= maskLayer;
}
网友评论