Skip to content

Instantly share code, notes, and snippets.

@johankool
Created April 18, 2011 05:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johankool/924859 to your computer and use it in GitHub Desktop.
Save johankool/924859 to your computer and use it in GitHub Desktop.
Alternative approach to have consistent UILabel styling.
//
// KVStylesheet.m
// Koolistov
//
// Created by Johan Kool on 15-04-2011.
// Copyright 2011 Koolistov. Use as you desire.
//
#import "KVStylesheet.h"
@implementation KVStylesheet
+ (void)applyMainStyleToLabel:(UILabel *)label {
label.textColor = [UIColor greenColor];
label.font = [UIFont systemFontOfSize:36.0f];
}
+ (void)applyAlternateStyleToLabel:(UILabel *)label {
[self applyMainStyleToLabel:label];
label.textColor = [UIColor redColor];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment