A list of methods and properties conforming to `UIAppearance` as of iOS 8.0 - Gist is a simple way to share snippets of text and code with others.

seen from Ireland

seen from Ireland
seen from Poland
seen from Sweden
seen from United Kingdom
seen from Germany
seen from Australia
seen from China
seen from Poland

seen from United States

seen from United States
seen from United States
seen from India

seen from Australia
seen from United States
seen from Germany

seen from United States

seen from Türkiye
seen from Germany

seen from Ireland
A list of methods and properties conforming to `UIAppearance` as of iOS 8.0 - Gist is a simple way to share snippets of text and code with others.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Changing button shades..
//resizableImageWithCapInsets:UIEdgeInsetsMake
[[UIActivityIndicatorView appearance] setColor:[UIColor redColor]];
UIImage *navBarImage = [UIImage imageNamed:@"navbar"]; navBarImage = [navBarImage resizableImageWithCapInsets:UIEdgeInsetsMake(0, 20.0, 0, 20.0)]; UIImage *navBarLandscapeImage = [UIImage imageNamed:@"navbar-landscape"]; navBarLandscapeImage = [navBarLandscapeImage resizableImageWithCapInsets:UIEdgeInsetsMake(0, 20.0, 0, 20.0)];
http://useyourloaf.com/blog/2012/08/24/using-appearance-proxy-to-style-apps.html
Visiting Categories
You're all familiar with the visitor pattern (wikipedia). One of its limitations is that it's only really useful for classes you are writing yourself. That is, unless you have a runtime that allows you to add methods to existing classes like the Objective-C runtime allows via categories (Apple).
Preparing to Visit
Say for example you want to add the ability to traverse your UIView hierarchy and visit each view. The first step is to provide the visitor type that you would like to have visit your views.
@interface ViewVisitor : NSObject - (void)visitView:(UIView *)view; - (void)visitLabel:(UILabel *)label; - (void)visitButton:(UIButton *)button; ... @end
Now add an acceptVisitor: method to UIView.
@interface UIView (AcceptsViewVisitor) - (void)acceptVisitor:(ViewVisitor *)visitor; @end
Now for UIView and each of it's subclasses, implement the acceptVisitor:.
@implementation UIView (AcceptsViewVisitor) - (void)acceptVisitor:(ViewVisitor *)visitor { [visitor visitView:self]; } @end
You should provide an implementation of this category for each visit___: method you provide in your ViewVisitor class. If you don't provide an implementation for a particular UIView subclass then it's nearest parent class's implementation of the AcceptsViewVisitor will invoke that parent class's associated visit___: method. For example if you provide a visitScrollView: method and implement the AcceptsViewVisitor category for UIScrollView, then calling acceptVisitor: on a UITableView will result in visitScrollView: being called on your visitor with that UITableView instance.
**Paying a Visit***
Now you can pass your useful subclass of ViewVisitor and pass an instance to each of the views you would like to visit.
MyNSLoggingVisitor *visitor = [MyNSLoggingVisitor new]; for (UIView *subview in view.subviews) [subview acceptVisitor:visitor]; }];
Making an Appearance
One fun application of this approach is to style your UI using UIKit's Appearance Proxies (NSHipster).
It turns out that you can set custom setters on class' UIAppearanceProxies and these setters (which must have an object as the first parameter and start with 'set') will be invoked at the appropriate time for instances of that class. Leveraging that we can style a whole UIViewController's contents with a single ViewVisitor instance by providing a setter in a UIView category with the following implementation:
- (void)setAppearanceVisitor:(ViewVisitor *)visitor { [self acceptVisitor:visitor]; }
Now for your WickedAwesomeViewController just add this code to your + (void)initialize method or invoke it somewhere before your view controller appears:
MakeItPrettyViewVisitor *visitor = [MakeItPrettyViewVisitor new]; [[UIView appearanceWhenContainedIn: [WickedAwesomeViewController class], nil] setAppearanceVisitor:visitor];
Check out the sample code on github!
Customization of UI controls
Before the launch of iOS 5, the customization of some UI elements (navigation bars, switches, etc.) was possible only writing a lot of code, subclassing or adding categories for each UI component. With iOS 5 Apple provided developers with a simpler way of customizing UI elements. Later, with iOS 6, every UI component became quite fully customizable.
Keep reading
UIAppearance cheat sheet
If you aren't already reading NSHipster, you should be. This week's article covers the UIAppearance protocol, but even cooler than the article itself is this Gist outlining all of the different ways that UIAppearance can be used.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
UIAppearance - Customize UI elements
UIAppearance, introduced with iOS5, is the fast and simple way to customize UI elements in iOS or OSX. The UIAppearance protocol get the appearance proxy for a class. So you can customize the appearance of instances of a class by sending appearance modification messages to the class’s appearance proxy.
Yeah yeah, ok, i wanna learn how it works!
There are two ways to customize the appearance of a UI element.Â
customize all instance of a element ex:
[[UINavigationBar appearance] setTintColor:myColor];
customize instance of a element in a specific container class ex:Â
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTintColor:myNavBarColor];
Well, in the - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method you can start to customize the UI elements like below.
UILabel *labelTitle = [UILabel appearance]; [labelTitle setTextColor:[InterfaceHelper colorFromHexString:@"#333333"]]; UIButton *buttonBlu = [UIButton appearance]; UIImage *buttonBluImage = [UIImage imageNamed:@"mybutton.png"]; [buttonBlu setBackgroundImage:buttonBluImage forState:UIControlStateNormal]; [buttonBlu setTitleColor:[InterfaceHelper colorFromHexString:@"#f0f0f0"] forState:UIControlStateNormal]; [buttonBlu setTitleColor:[InterfaceHelper colorFromHexString:@"#f0f0f0"] forState:UIControlStateHighlighted]; [buttonBlu setTitleColor:[InterfaceHelper colorFromHexString:@"#f0f0f0"] forState:UIControlStateSelected]; UITextField *textFieldLogin = [UITextField appearanceWhenContainedIn:[MyCustomViewController class], nil]; [textFieldLogin setBorderStyle:UITextBorderStyleNone]; [textFieldLogin setBackground:[UIImage imageNamed:@"textbox.png"]]; UINavigationBar *navigationBar = [UINavigationBar appearance]; [navigationBar setBackgroundImage:[UIImage imageNamed:@"top.png"] forBarMetrics:UIBarMetricsDefault]; [navigationBar setBackgroundImage:[UIImage imageNamed:@"top.png"] forBarMetrics:UIBarMetricsLandscapePhone]; UITableView *tableView = [UITableView appearance]; [tableView setBackgroundColor:[InterfaceHelper colorFromHexString:@"#666666"]]; UIBarButtonItem *buttonItem = [UIBarButtonItem appearance]; [buttonItem setBackButtonBackgroundImage:[UIImage imageNamed:@"navbutton.png"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [buttonItem setBackgroundImage:[UIImage imageNamed:@"navbutton.png"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [buttonItem setTitleTextAttributes:[NSDictionary dictionaryWithObject:[UIFont fontWithName:@"Arial-BoldMT" size:12] forKey:UITextAttributeFont] forState:UIControlStateNormal]; UITabBar *tabBar = [UITabBar appearance]; [tabBar setBackgroundImage:[UIImage imageNamed:@"tabBackground.png"]]; [tabBar setSelectionIndicatorImage:[UIImage imageNamed:@"tabSel.png"]];
Where the InterfaceHelper is a custom class where you can convert hex to rgb :
// Assumes input like "#00FF00" (#RRGGBB). +(UIColor *)colorFromHexString:(NSString *)hexString { return [InterfaceHelper colorFromHexString:hexString andAlpha:1]; } +(UIColor *)colorFromHexString:(NSString *)hexString andAlpha:(float)alpha{ unsigned rgbValue = 0; NSScanner *scanner = [NSScanner scannerWithString:hexString]; [scanner setScanLocation:1]; // bypass '#' character [scanner scanHexInt:&rgbValue]; return [UIColor colorWithRed:((rgbValue & 0xFF0000) >> 16)/255.0 green:((rgbValue & 0xFF00) >> 8)/255.0 blue:(rgbValue & 0xFF)/255.0 alpha:alpha]; }
So appearance for UIElements inside the applications/custom controllers are changed by your preferences.
Finally, if you wanna change the appearance for a "not ready for appear" property, you can support the appearance marking the property with UI_APPEARANCE_SELECTOR in the .h file, like below (the class with the property declaration, must be conform to the UIAppearanceContainer protocol).
@property (nonatomic, strong) UIColor *myCustomColor UI_APPEARANCE_SELECTOR;
Now override the -(void)set myCustomColor:(UIColor *)myCustomColor method in the .m.
That's all!