2010-07-07 7 views

Répondre

0

Pas vraiment. Vous pourriez être en mesure d'utiliser un style CSS (en utilisant la propriété text-shadow) <textarea> dans un UIWebView, cependant.

+0

Vous pouvez en effet ajouter un éclat à partir de iOS6. Voir ma réponse ci-dessous. – phatmann

1

Voici un code pour ajouter une lueur rouge à un UITextView. Nécessite iOS 6+. Ajustez les paramètres au goût:

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];