【问题标题】:Why cornerradius takes more time to round the corner sometimes为什么cornerradius有时需要更多时间才能绕过拐角
【发布时间】:2017-05-03 07:05:37
【问题描述】:

我正在尝试通过调用obj.Layer.CornerRadius=3 来查看角落 但有时需要更多时间才能在 UI 上生效... 而UIBezierPath 并设置图层的蒙版无法始终如一地工作......有时两个角是圆角的,而另外两个角不是圆角的。

xamarin.ios 中的圆角是否有任何一致且有效的解决方案

仅供参考: 我在 viewdidload 处转角

【问题讨论】:

    标签: ios xamarin xamarin.ios uibezierpath rounded-corners


    【解决方案1】:
    Method 1. 
    if you are making corner radius in cell then write your code inside cell.m class 
    like this 
    - (void)awakeFromNib {
        [super awakeFromNib];
        _btnEdit.layer.cornerRadius = 5;
        _btnEdit.layer.masksToBounds=YES;
    }
    
    Method 2.
    write your code on mainthread in viewdidload
    
    Hope it works for you!!! :)
    

    【讨论】:

      猜你喜欢
      • 2021-07-17
      • 2015-09-17
      • 2019-11-13
      • 1970-01-01
      • 1970-01-01
      • 2020-11-08
      • 2011-04-12
      • 2013-02-06
      相关资源
      最近更新 更多