The default UIButton round rectangle is that dark blue. I want my cell's text in a table to match this blue color.
I am using this code but the only blue I can find is a bright blue...
cell.textLabel.textColor = [UIColor blueColor];
The system button text color for iOS 7 and above is:
Swift:
UIColor(red: 0, green: 0.478431, blue: 1, alpha: 1)
Objective-C:
[UIColor colorWithRed:0 green:0.478431 blue:1 alpha:1]
UIColor* theColor = _yourButton.currentTitleColor; NSLog(@"title color: %@",theColor");
if further proof required.
Commented
Jul 14, 2016 at 21:36
print(UIButton(type: .System).currentTitleColor)
Commented
Sep 2, 2016 at 15:43
UIColor *systemTextColor = [[[UIButton buttonWithType:UIButtonTypeSystem] titleLabel] textColor]; cell.textLabel.textColor = systemTextColor;
Use this code to set the color using RGB value
cell.textLabel.textColor = [UIColor colorWithRed:.196 green:0.3098 blue:0.52 alpha:1.0];
The color in iOS6 is:
[UIColor colorWithRed:0.22 green:0.33 blue:0.53 alpha:1.0]