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
- Host: GitHub
- URL: https://github.com/below/textviewappearance
- Owner: below
- License: mit
- Created: 2016-05-24T16:41:02.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-24T20:40:44.000Z (almost 10 years ago)
- Last Synced: 2025-01-26T02:44:06.172Z (about 1 year ago)
- Language: Swift
- Size: 38.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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

# Actual Result

Is this behaviour expected?
Am I doing it wrong?