How to make the effect of a brilliant glow around the icon / image? (Photo provided inside)

Before mouseover:

enter image description hereenter image description here

after mouse:

enter image description hereenter image description here

It seems that the glow effect will change its shape in accordance with the shape of the image. Is this NSShadow? How to implement this in code? Any hints or examples? Thank you very much.

+4
source share
2 answers

I could with iOS, but I think the same thing:

  • set zero offset for shadow
  • just grease it
  • specify the correct size
  • and select white as the color.
+6
source

This is what I used in my case, which practically matches with another answer, but with the code:

myImage.layer.shadowColor = [UIColor whiteColor].CGColor; myImage.layer.shadowRadius = 4.0f; myImage.layer.shadowOpacity = .9; myImage.layer.shadowOffset = CGSizeZero; myImage.layer.masksToBounds = NO; 

Taken from here

+2
source

All Articles