Draw a simple circle uiimage

前端 未结 6 1515
遥遥无期
遥遥无期 2020-12-28 12:33

I try to make a 20x20 UIImage with a simple blue circle. I try with this function, but the result is a blue circle in a black square. How do I remove the black square around

6条回答
  •  無奈伤痛
    2020-12-28 13:13

    You need to include alpha channel into your bitmap: UIGraphicsBeginImageContextWithOptions(..., NO, ...) if you want to see what is behind the corners.

提交回复
热议问题