zoukankan      html  css  js  c++  java
  • button只切其中几个圆角

    
    //无边框线
    
    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.openGroupBtn.bounds byRoundingCorners:UIRectCornerTopRight | UIRectCornerBottomRight cornerRadii:CGSizeMake(radius,radius)];
    
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
    
    maskLayer.frame = self.openGroupBtn.bounds;
    
    maskLayer.path = maskPath.CGPath;
    
    self.openGroupBtn.layer.mask = maskLayer;
    
    //有边框线
    
    UIBezierPath *rectPath=[UIBezierPath bezierPathWithRoundedRect:self.spellNumBtn.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomLeft cornerRadii:CGSizeMake(radius, radius)];
    
    CAShapeLayer *rectLayer=[CAShapeLayer layer];
    
    //线条颜色
    
    rectLayer.strokeColor=[UIColor colorWithHex:goldenYellow].CGColor;
    
    //填充颜色
    
    rectLayer.fillColor=[UIColor colorWithHex:CenColor].CGColor;
    
    //线条宽度
    
    rectLayer.lineWidth=1;
    
    //起始结束点的样式
    
    rectLayer.lineJoin=kCALineJoinRound;
    
    //线条拐角的样式
    
    rectLayer.lineCap=kCALineCapRound;
    
    rectLayer.path=rectPath.CGPath;
    
    [self.spellNumBtn.layer addSublayer:rectLayer];
  • 相关阅读:
    第02组 团队项目-需求分析报告
    团队项目-选题报告
    第二次结对编程作业
    第2组 团队展示
    Alapha冲刺(3/6)
    Alpha(2/6)
    Alpha冲刺(1/6)
    第2组 团队Git现场编程实战
    团队项目-需求分析报告
    团队项目-选题报告
  • 原文地址:https://www.cnblogs.com/idefei/p/7607214.html
Copyright © 2011-2022 走看看