Search code examples
iosios7ios6uicolor

colorWithPatternImage not working in io6?


I'm using colorWithPatternImage to change text color of UITextView. Its working fine in IO7 but not working in IO6.

Here is my Code :-

text.textColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"ColorName.png"]];

Solution

  • The internals of UITextView changed hugely between iOS 6 and 7. Before iOS7, UITextView didn't support pattern colours for the text colour. Several components gained support for pattern colours in iOS 7, and UITextView was one of them.