Blurred UIView

Is there any way to blur / fade the border of a UIView?

So far I have worked very little with basic graphics.

+4
source share
1 answer

You can try installing a UIView CALayer with a large shadow radius and transparency. Sort of:

#include <QuartzCore/QuartzCore.h> 

...

  CALayer *layer = myView.layer; layer.shadowOpacity = .5; layer.shadowColor = [[UIColor blackColor] CGColor]; layer.shadowOffset = CGSizeMake(0,0); layer.shadowRadius = 10; 
+14
source

Source: https://habr.com/ru/post/1433391/


All Articles