self.view.opaque = YES;Not what I was looking for, but might as well write down, looks useful enough. Another tool in the toolbox, even though everything still looks like a nail.
self.view.backgroundColor = [UIColor yellowColor];
self.textView.opaque = NO;
self.textView.backgroundColor = [UIColor clearColor];
self.textView.textColor = [UIColor orangeColor];
Wednesday, March 30, 2011
How to Change UITextView Background Color
You have UIView, which contains UITextView with some text. This is how to change UITextView background color:
Subscribe to:
Post Comments (Atom)
Thanks! I could not figure out why Xcode was showing my background color to my chosen one but when I ran it on the device/simulator it was still white!
ReplyDeleteEdit: I see what I was doing wrong when setting the value... I had set it in Xcode, but still had bad code in the controller for the view. Instead of using 0.0 to 1.0 as values, I was using 8-bit color codes (250, 145, 10) for my values! Doh!
can u change the default color of link in UITextView
ReplyDeleteAs far as I know, you can NOT change link color in UITextView. If it's really important, you could use UIWebView and some CSS.
ReplyDelete