zoukankan      html  css  js  c++  java
  • 设置UIButton一侧圆角

    UIButton * button =[UIButton buttonWithType:UIButtonTypeSystem];
    [self.view addSubview:button];//一定要先添加到视图上
    button.frame=CGRectMake(100, 100, 100, 40);
    button.backgroundColor=[UIColor blueColor];
    
    UIBezierPath *maskPath=[UIBezierPath bezierPathWithRoundedRect:button.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)];
    CAShapeLayer *maskLayer=[[CAShapeLayer alloc]init];
    maskLayer.frame=button.bounds;
    maskLayer.path=maskPath.CGPath;
    button.layer.mask=maskLayer;
  • 相关阅读:
    团购网站之大众点评
    cas xml
    smsUtil
    solr配置
    xml
    yu
    Schema.xml
    ApplicationContext-redis.xml
    fast
    第一版
  • 原文地址:https://www.cnblogs.com/akiha/p/6526783.html
Copyright © 2011-2022 走看看