0

How can I remove a circular section from a UIBlurEffect.

I have a full page blur and a image with circle buttons.

I want to be able to cut out the section of the blur that covers a particular circle button.

  • Please explain your question clearly. – User511 Nov 07 '16 at 07:44
  • He wants a "hole" in the blurred effect "cover". A small region that is not blurred. – Nicolas Miari Nov 07 '16 at 08:13
  • The workaround I'm going to suggest is too lame for an answer, so I'm posting it as a comment. – Nicolas Miari Nov 07 '16 at 08:13
  • Perhaps you can overlay a UIView with a copy of the child views that are blurred (i.e., your button), with corner layer radius equal to half its side (so it appears as a circle), and the `clipsToBounds` property set to `true`. – Nicolas Miari Nov 07 '16 at 08:14
  • So, instead of "cutting a hole" in the blur view, you are overlaying a circularly bound view with an unblurred copy of the contents beneath. A fake, but the visual result is the same. – Nicolas Miari Nov 07 '16 at 08:16
  • Otherwise, check this question/answer (looks better than my suggestion) http://stackoverflow.com/questions/39595047/uivisualeffectview-with-mask-layer – Nicolas Miari Nov 07 '16 at 08:17

0 Answers0