Making a UIImage to a circle form

后端 未结 10 2083
南旧
南旧 2020-12-02 17:16

I have been trying to mask a UIImage into a circle. I\'m using now the code that has been popular on other answers here, but although I do get a circle its edges are very ja

10条回答
  •  误落风尘
    2020-12-02 17:29

    If you're using Swift, you can import 'AlamofireImage', and use one of its funcs. For circled image:

    let roundImage = UIImage(named: "myImage")!.af_imageRoundedIntoCircle()
    

提交回复
热议问题