search

Home  >  Q&A  >  body text

ios video playback - iOS avPlayer layer sets rounded corners

I use avplayer to play videos and want to set rounded corners for the video layer. I set the maskToBounds and cornerRadius of avplayerlayer. The layer is added to the imageView through the addSubLayer method. In addition, imageView displays album images and can complete rounded corners. Please tell me how to set it up? Thank you in advance


天蓬老师天蓬老师2775 days ago1306

reply all(1)I'll reply

  • 学习ing

    学习ing2017-06-07 09:26:56

    Instead of adding a sublayer, why not just set imageView.layer.cornerRadius?!

    reply
    0
  • Cancelreply