/ Text

Automatically determine the text color according to the background

Automatically determine the text color according to the background

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

GitHub