UITextView refuses to change its color

Posted by Friendlydeveloper on Stack Overflow See other posts from Stack Overflow or by Friendlydeveloper
Published on 2010-03-16T21:42:34Z Indexed on 2010/03/16 21:51 UTC
Read the original article Hit count: 165

Filed under:
|
|

Hello,

in some cases things you'd expect to solve within a sec turn out to become a lifetime adventure. This is one of these cases :)

All I wanted to do, is simply change the text color of one of my UITextViews. So far I tried:

UIColor *myColor = [UIColor colorWithHue:38 saturation:98 brightness:100 alpha:1.0];
[myTextView setTextColor:myColor];

OR

UIColor *myColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"colorImage.png"]];
[myTextView setTextColor:myColor]; 

Both seem to work fine for UILabels, but fail for UITextView elements. When I try [UIColor colorWithHue... I only get a reddish kinda color, no matter what values I choose (except values for black and white. They work). The colorWithPatternImage does not change textColor at all.

Strange isn't it? I obviously must be missing something. Help is very much appreciated. Thanks in advance.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uitextview