2012-04-05 8 views
0

フォントのグロー効果の例があるのでしょうか?私はNSAttributedStringを見ようとしましたが、テキストの文字列では見つかりませんでした。フォントにグロー効果をつける

+1

[可能性のある複製] [テキストを明るくするための簡単な方法やライブラリがありますか?](http://stackoverflow.com/questions/1229721/is-there-an-easy-way-or-library-available- to-let-text-glow) – jrturton

答えて

2

これを試してみてください:

#include <Quartzcore/Quartzcore.h> 
....... 
yourLabel.layer.shadowColor = [[UIColor glowColor] CGColor]; //Replace glowColor with the desired color (redColor, greenColor, etc.) 
yourLabel.layer.shadowOffset = CGSizeMake(0.0, 0.0); //The glow starts from the center 

yourLabel.layer.shadowRadius = 20.0; //You can change this to the desired amount 
yourLabel.layer.shadowOpacity = 0.5; //You can change this to the desired amount 

yourLabel.layer.masksToBounds = NO; //Keep this the same to avoid shadow being clipped by the label bounds 

は、この情報がお役に立てば幸い!

関連する問題