调用#pragma mark - 控件虚线边框 /** 给控件设置虚线边框 @param strokeColor 边框颜色 @param fillColor 控件填充颜色 @param rect 控件的bound @param width 虚线的宽度 @param pattern 虚线的间隔:数组 @param radius 控件的圆角 @return layer */ -(CAShapeLayer *)newLayer:(UIColor *)strokeColor fillColor:(UIColor *)fillColor rect:(CGRect)rect width:(CGFloat)width pattern:(NSArray *)pattern radius:(CGFloat)radius{ CAShapeLayer *layer = [CAShapeLayer layer]; layer.strokeColor = strokeColor.CGColor; layer.fillColor = fillColor.CGColor; UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:rect cornerRadius:radius]; layer.path = path.CGPath; layer.frame = rect; layer.lineWidth = width; layer.lineDashPattern = pattern; layer.masksToBounds = YES; return layer; }
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.frame = CGRectMake(16, 0, self.view.frame.size.width - 32, 45); [btn setTitle:@"确定" forState:UIControlStateNormal]; [btn setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal]; btn.titleLabel.font = [UIFont systemFontOfSize:17]; btn.layer.masksToBounds = YES; [self.view addSubview:btn]; [btn.layer addSublayer:[self newLayer:theme_Color fillColor:[UIColor clearColor] rect:btn.bounds width:1.0 pattern:@[@(2)] radius:5]];
本网页所有视频内容由 imoviebox边看边下-网页视频下载, iurlBox网页地址收藏管理器 下载并得到。
ImovieBox网页视频下载器 下载地址: ImovieBox网页视频下载器-最新版本下载
本文章由: imapbox邮箱云存储,邮箱网盘,ImageBox 图片批量下载器,网页图片批量下载专家,网页图片批量下载器,获取到文章图片,imoviebox网页视频批量下载器,下载视频内容,为您提供.
阅读和此文章类似的: 全球云计算