zoukankan      html  css  js  c++  java
  • iOS只给矩形两个边加圆角

    - (void)updataTopCornerRadius {
        CGRect clipRect = CGRectMake(0, 0, self.headPhotoIv.width, self.headPhotoIv.width);
        UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:clipRect byRoundingCorners:UIRectCornerTopLeft|UIRectCornerTopRight cornerRadii:CGSizeMake(8, 8)];
        CAShapeLayer *maskLayer = [CAShapeLayer layer];
        maskLayer.frame = clipRect;
        maskLayer.path = maskPath.CGPath;
        self.headPhotoIv.layer.mask = maskLayer;
    
    }

  • 相关阅读:
    RPC学习
    json
    jsf
    ajax分析
    async分析
    web后台
    servlet和CGI区别(转)
    forward和redirect
    (转)jvm
    Async分析
  • 原文地址:https://www.cnblogs.com/tufei7/p/8665168.html
Copyright © 2011-2022 走看看