Colorize the differences between two String in the simpliest possible way!
ColorDiffy only evaluates the differences on the second string compared to the first.
Requires:
iOS 9.0+ Swift 4.0+
Usage:
Cocoapods:
- Move to your project folder.
- pod init
- Open your Podfile and insert pod 'ColorDiffy'.
- pod install
Example with
UILabel import ColorDiffy
let myLabel = UILabel()//if not specified, default color is red
myLabel.attributedText = ColorDiffy.findDifferencesBetween(stringOne: firstString, stringTwo: secondString)OR
myLabel.attributedText = ColorDiffy.findDifferencesBetween(stringOne: firstString, stringTwo: secondString, color: UIColor.yellow)