zoukankan      html  css  js  c++  java
  • UIbutton 和UIview 切单角

        UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
        btn.backgroundColor = [UIColor cyanColor];
        btn.frame = CGRectMake(100, 100, 100, 100);
        [self.view addSubview:btn];
        
        UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:btn.bounds      byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight    cornerRadii:CGSizeMake(10, 10)];
        CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
        maskLayer.frame = btn.bounds;
        maskLayer.path = maskPath.CGPath;
        btn.layer.mask = maskLayer;

    UIButton  UIView 同理。

  • 相关阅读:
    洛谷P3747 [六省联考2017]相逢是问候
    染色(dye)
    BZOJ1426: 收集邮票
    消息队列RabbitMQ
    CRM
    BBS
    版本控制
    RESTful API
    Luffy
    axios使用
  • 原文地址:https://www.cnblogs.com/sayimba/p/5653535.html
Copyright © 2011-2022 走看看