ios为View增加边框

xiaoxiao2021-02-28  39

//将图层边框设置为圆角

        cell.layer.cornerRadius = 5;

        cell.layer.masksToBounds = YES;

        //给图层添加一个有色边框

        cell.layer.borderWidth = 1;

        cell.layer.borderColor = [[UIColor colorWithRed:204.0/255.0 green:204.0/255.0 blue:204.0/255.0 alpha:1] CGColor];

转载请注明原文地址: https://www.6miu.com/read-2613648.html

最新回复(0)