Clear Background color on UIImageView?

后端 未结 2 1300
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-12 22:52

hello i have a UIimageView with a PNG image that has round corners, image sits fine the only problem it has is that i can see the UIImage Corners with a white background, ho

相关标签:
2条回答
  • 2021-01-12 23:29

    try

    imageView.backgroundColor = [UIColor clearColor];
    
    0 讨论(0)
  • 2021-01-12 23:50

    Try this:

    imageView.backgroundColor = [UIColor clearColor];
    imageView.opaque = NO;
    

    You can achieve the same thing in IB by making the 'Background' a color with 0% opacity, and unticking the 'Opaque' checkbox.

    0 讨论(0)
提交回复
热议问题