Skip to content
Automatically determine the text color according to the background
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
img
LICENSE
README.md
VisibleTextContainer.swift

README.md

Platform Language

VisibleText

Automatically determine and apply the text color according to the background. If the background is dark, the text will be light or dark if background is light !

Installation

Import VisibleTextContainer.swift in your project (or use example project)

Usage

Add UIView and set "Custom class" in "Identity inspector" with VisibleTextContainer :

Img

Add UILabel, UITextView or UITextField in VisibleTextContainer :

Img

Change light text color or dark text color :

Img

Img

License

VisibleText is available under the MIT license. See the LICENSE file for more info. If you use it, I'll be happy to know about it.

You can’t perform that action at this time.