2010-07-07 90 views

回答

0

不是。不過,您可能可以使用CSS樣式(使用text-shadow屬性)<textarea>UIWebView中。

+0

您確實可以在iOS6中添加發光。請參閱下面的答案。 – phatmann 2014-04-30 22:03:07

1

這裏有一些代碼將一個紅色的光芒添加到UITextView。需要iOS 6+。調整參數的口味:

NSShadow *shadow   = [NSShadow new]; 
shadow.shadowBlurRadius = 5; 
shadow.shadowColor  = [UIColor redColor]; 
shadow.shadowOffset  = CGSizeMake(0, 0); 

NSDictionary *attributes = @{NSShadowAttributeName:shadow}; 

textView.attributedText = [[NSAttributedString alloc] 
             initWithString:title 
              attributes:attributes];