|
@@ -93,6 +93,19 @@
|
|
|
|
|
|
self.fontSelectBtn.frame = self.dropMenuView.bounds;
|
|
|
self.styleView.frame = CGRectMake(self.frame.size.width - 100, 0, 80, 30);
|
|
|
+
|
|
|
+ //bold
|
|
|
+ UIBezierPath *maskPath=[UIBezierPath bezierPathWithRoundedRect:self.boldBtn.bounds byRoundingCorners:UIRectCornerTopLeft |UIRectCornerBottomLeft cornerRadii:CGSizeMake(4, 4)];
|
|
|
+ CAShapeLayer *maskLayer=[[CAShapeLayer alloc]init];
|
|
|
+ maskLayer.frame = self.boldBtn.bounds;
|
|
|
+ maskLayer.path = maskPath.CGPath;
|
|
|
+ self.boldBtn.layer.mask = maskLayer;
|
|
|
+
|
|
|
+ UIBezierPath *maskPath1=[UIBezierPath bezierPathWithRoundedRect:self.italicBtn.bounds byRoundingCorners:UIRectCornerTopRight | UIRectCornerBottomRight cornerRadii:CGSizeMake(4, 4)];
|
|
|
+ CAShapeLayer *maskLayer1 =[[CAShapeLayer alloc]init];
|
|
|
+ maskLayer1.frame = self.italicBtn.bounds;
|
|
|
+ maskLayer1.path = maskPath1.CGPath;
|
|
|
+ self.italicBtn.layer.mask = maskLayer1;
|
|
|
}
|
|
|
|
|
|
- (IBAction)fontBoldAction:(UIButton *)sender {
|
|
@@ -141,9 +154,9 @@
|
|
|
-(void)setIsItalic:(BOOL)isItalic {
|
|
|
_isItalic = isItalic;
|
|
|
if(isItalic) {
|
|
|
- [self.boldBtn setBackgroundColor:[UIColor colorWithRed:221/255. green:223/255. blue:255/255. alpha:1.]];
|
|
|
+ [self.italicBtn setBackgroundColor:[UIColor colorWithRed:221/255. green:223/255. blue:255/255. alpha:1.]];
|
|
|
}else{
|
|
|
- [self.boldBtn setBackgroundColor:[UIColor clearColor]];
|
|
|
+ [self.italicBtn setBackgroundColor:[UIColor clearColor]];
|
|
|
}
|
|
|
|
|
|
[self.italicBtn setSelected:isItalic];
|