An open API service indexing awesome lists of open source software.

https://github.com/below/textviewappearance

Sample Project for Text View Appearance
https://github.com/below/textviewappearance

Last synced: about 1 year ago
JSON representation

Sample Project for Text View Appearance

Awesome Lists containing this project

README

          

# TextViewAppearance
Sample Project for Text View Appearance

I use the `UIAppearance` API to set the textColor of my textViews:
```swift
UITextView.appearance().textColor = UIColor.blackColor()
```
However, when I then set an attributed text with a different color, this does not seem to be honored:
```swift
output.replaceCharactersInRange(range, withAttributedString: NSAttributedString(string:red, attributes:[NSForegroundColorAttributeName : UIColor.redColor()]))
```

# Expected Result
![Expected Result](https://raw.githubusercontent.com/below/TextViewAppearance/master/Expected%20Result.png)

# Actual Result
![Actual Result](https://raw.githubusercontent.com/below/TextViewAppearance/master/Actual%20Result.png)

Is this behaviour expected?

Am I doing it wrong?