iOS Highlighted and Highlighted Text Color


Example

Objective-C

UILabel *label = [[UILabel alloc] init];
label.highlighted = YES;
label.highlightedTextColor = [UIColor redColor];

Swift

let label = UILabel()
label.highlighted = true
label.highlightedTextColor = UIColor.redColor()

Swift 3

let label = UILabel()
label.isHighlighted = true
label.highlightedTextColor = UIColor.red