self.topView = [UIView new];
[self.view addSubview:self.topView];
self.topView.sd_layout
.leftSpaceToView(self.view, (CKScreenW -300)/2)
.topSpaceToView(self.view,CKScreenH/2 - 160)
.widthIs(300)
.heightIs(15);
self.topView.backgroundColor = [UIColor whiteColor];
// typedef NS_OPTIONS(NSUInteger, UIRectCorner) {
// UIRectCornerTopLeft = 1 << 0,
// UIRectCornerTopRight = 1 << 1,
// UIRectCornerBottomLeft = 1 << 2,
// UIRectCornerBottomRight = 1 << 3,
// UIRectCornerAllCorners = ~0UL
// };
UIBezierPath *maskPath2 = [UIBezierPathbezierPathWithRoundedRect:self.topView.boundsbyRoundingCorners:UIRectCornerTopLeft|UIRectCornerTopRightcornerRadii:CGSizeMake(10, 10)];
CAShapeLayer *maskLayer2 = [[CAShapeLayer alloc] init];
maskLayer2.frame = self.topView.bounds;
maskLayer2.path = maskPath2.CGPath;
self.topView.layer.mask = maskLayer2;