开发者

How can I make the shiny glow effect around an icon/image? (Pics provided inside)

Before mouse over:

How can I make the shiny glow effect around an icon/image? (Pics provided inside)

How can I make the shiny glow effect around an icon/image? (Pics provided inside)

after mouse over:

How can I make the shiny glow effect around an icon/image? (Pics provided inside)

How can I make the shiny glow effect around an icon/image? (Pics provided inside)

Seems like the glow effect will change its shape according to the image 开发者_C百科shape. Is this a NSShadow? How to implement this in code? Any clues or examples? Thanks a lot.


I could with iOS but I think the same applies:

  • set zero offset for the shadow
  • blur it enough
  • give right size
  • and choose white as color.


This is what I used in my case, which is practically the same as the other answer but with 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜