Making a UIImage to a circle form

后端 未结 10 2069
南旧
南旧 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:40

    try this code

    yourImageView.layer.cornerRadius = yourImageView.frame.size.height /2;
    yourImageView.layer.masksToBounds = YES;
    yourImageView.layer.borderWidth = 0;
    

    this show image like ios 7 circle image thanks

提交回复
热议问题