45 |
45 |
46 |
46 |
47 #pragma mark - |
47 #pragma mark - |
48 @implementation UITableView (backgroundColor) |
48 @implementation UITableView (backgroundColor) |
49 |
49 |
50 -(void) setBackgroundColorForAnyTable:(UIColor *) color { |
50 - (void)setBackgroundColorForAnyTable:(UIColor *) color { |
51 if ([self respondsToSelector:@selector(backgroundView)]) { |
51 if ([self respondsToSelector:@selector(backgroundView)]) { |
52 UIView *backView = [[UIView alloc] initWithFrame:self.frame]; |
52 UIView *backView = [[UIView alloc] initWithFrame:self.frame]; |
53 backView.backgroundColor = color; |
53 backView.backgroundColor = color; |
54 self.backgroundView = backView; |
54 self.backgroundView = backView; |
55 [backView release]; |
|
56 self.backgroundColor = [UIColor clearColor]; |
55 self.backgroundColor = [UIColor clearColor]; |
57 } else |
56 } else |
58 self.backgroundColor = color; |
57 self.backgroundColor = color; |
59 } |
58 } |
60 |
59 |
95 |
94 |
96 |
95 |
97 #pragma mark - |
96 #pragma mark - |
98 @implementation UIButton (quickStyle) |
97 @implementation UIButton (quickStyle) |
99 |
98 |
100 -(id) initWithFrame:(CGRect) frame andTitle:(NSString *)title { |
99 - (id)initWithFrame:(CGRect)frame andTitle:(NSString *)title { |
101 [self initWithFrame:frame]; |
100 if (!(self = [self initWithFrame:frame])) return nil; |
102 [self setTitle:title forState:UIControlStateNormal]; |
101 [self setTitle:title forState:UIControlStateNormal]; |
103 [self applyBlackQuickStyle]; |
102 [self applyBlackQuickStyle]; |
104 |
103 |
105 return self; |
104 return self; |
106 } |
105 } |
135 |
134 |
136 |
135 |
137 #pragma mark - |
136 #pragma mark - |
138 @implementation UILabel (quickStyle) |
137 @implementation UILabel (quickStyle) |
139 |
138 |
140 -(id) initWithFrame:(CGRect)frame andTitle:(NSString *)title { |
139 - (id)initWithFrame:(CGRect)frame andTitle:(NSString *)title { |
141 return [self initWithFrame:frame |
140 return [self initWithFrame:frame |
142 andTitle:title |
141 andTitle:title |
143 withBorderWidth:1.5f |
142 withBorderWidth:1.5f |
144 withBorderColor:[UIColor darkYellowColor] |
143 withBorderColor:[UIColor darkYellowColor] |
145 withBackgroundColor:[UIColor darkBlueColor]]; |
144 withBackgroundColor:[UIColor darkBlueColor]]; |
146 } |
145 } |
147 |
146 |
148 -(id) initWithFrame:(CGRect)frame andTitle:(NSString *)title withBorderWidth:(CGFloat) borderWidth { |
147 - (id)initWithFrame:(CGRect)frame andTitle:(NSString *)title withBorderWidth:(CGFloat)borderWidth { |
149 return [self initWithFrame:frame |
148 return [self initWithFrame:frame |
150 andTitle:title |
149 andTitle:title |
151 withBorderWidth:borderWidth |
150 withBorderWidth:borderWidth |
152 withBorderColor:[UIColor darkYellowColor] |
151 withBorderColor:[UIColor darkYellowColor] |
153 withBackgroundColor:[UIColor darkBlueColorTransparent]]; |
152 withBackgroundColor:[UIColor darkBlueColorTransparent]]; |
154 } |
153 } |
155 |
154 |
156 -(id) initWithFrame:(CGRect)frame andTitle:(NSString *)title withBorderWidth:(CGFloat) borderWidth |
155 - (id)initWithFrame:(CGRect)frame andTitle:(NSString *)title withBorderWidth:(CGFloat)borderWidth |
157 withBorderColor:(UIColor *)borderColor withBackgroundColor:(UIColor *)backColor { |
156 withBorderColor:(UIColor *)borderColor withBackgroundColor:(UIColor *)backColor { |
158 UILabel *theLabel = [self initWithFrame:frame]; |
157 UILabel *theLabel = [self initWithFrame:frame]; |
159 theLabel.backgroundColor = backColor; |
158 theLabel.backgroundColor = backColor; |
160 |
159 |
161 if (title != nil) { |
160 if (title != nil) { |