UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(PhaseHalf(CGRectGetWidth(self.view.bounds),kWidth), PhaseHalf(CGRectGetHeight(self.view.bounds),kWidth), kWidth, kWidth)];
[btn setBackgroundColor:[UIColor redColor]];
[self.view addSubview:btn];
[btn addTarget:self action:@selector(onBtnTouchUpInside:) forControlEvents:UIControlEventTouchUpInside];
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:btn.bounds byRoundingCorners:UIRectCornerBottomLeft| UIRectCornerBottomRight cornerRadii:CGSizeMake(10.0, 10.0)];
CAShapeLayer *maskLayer = [CAShapeLayer layer];
maskLayer.frame = btn.bounds;
maskLayer.path = maskPath.CGPath;
btn.layer.mask = maskLayer;