UIImage with transparent rounded corners

后端 未结 5 2094
无人共我
无人共我 2020-12-03 15:50

I\'m using following code to add rounded corners to my UIImage, but the problem is that the rounded corners are showing \"white\" area instead of transparent or \"clear\". W

5条回答
  •  一生所求
    2020-12-03 16:46

    profileImageView.layer.cornerRadius = profileImageView.frame.size.height/2;
    profileImageView.clipsToBounds = YES;
    

提交回复
热议问题