Skip to content

Instantly share code, notes, and snippets.

@codeswimmer
Created January 2, 2013 20:03
Show Gist options
  • Select an option

  • Save codeswimmer/4437463 to your computer and use it in GitHub Desktop.

Select an option

Save codeswimmer/4437463 to your computer and use it in GitHub Desktop.
iOS: UIColor System Colors
UIColorSystemColors has these values to choose from.
@interface UIColor (UIColorSystemColors)
+ (UIColor *)lightTextColor; // for a dark background
+ (UIColor *)darkTextColor; // for a light background
+ (UIColor *)groupTableViewBackgroundColor;
+ (UIColor *)viewFlipsideBackgroundColor;
+ (UIColor *)scrollViewTexturedBackgroundColor __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_3_2);
+ (UIColor *)underPageBackgroundColor __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_5_0);
@end
If you want to use any of these UIColors to color your background. You can achieve it using a UIColor class object. See example below on changing window background color with texture.
mainWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
mainWindow.backgroundColor = [UIColor scrollViewTexturedBackgroundColor]; // Window background color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment