-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGrayBarButtonItem.m
63 lines (53 loc) · 1.73 KB
/
GrayBarButtonItem.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// GrayBarButtonItem.m
// unnamed
//
// Created by Bruce Ng on 2/20/15.
// Copyright (c) 2015 com.yahoo. All rights reserved.
//
#import "GrayBarButtonItem.h"
@implementation GrayBarButtonItem
- (void) setup {
[self setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor lightGrayColor],
NSForegroundColorAttributeName,
nil]
forState:UIControlStateNormal];
}
- (id) initWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItem target:(id)target action:(SEL)action {
self = [super initWithBarButtonSystemItem:systemItem target:target action:action];
[self setup];
return self;
}
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
[self setup];
return self;
}
- (id)init {
self = [super init];
[self setup];
return self;
}
- (id)initWithTitle:(NSString *)title style:(UIBarButtonItemStyle)style target:(id)target action:(SEL)action {
self = [super initWithTitle:title style:style target:target action:action];
[self setup];
return self;
}
- (id)initWithCustomView:(UIView *)customView {
self = [super initWithCustomView:customView];
[self setup];
return self;
}
- (id)initWithImage:(UIImage *)image style:(UIBarButtonItemStyle)style target:(id)target action:(SEL)action {
self = [super initWithImage:image style:style target:target action:action];
[self setup];
return self;
}
- (id)initWithImage:(UIImage *)image landscapeImagePhone:(UIImage *)landscapeImagePhone style:(UIBarButtonItemStyle)style target:(id)target action:(SEL)action {
self = [super initWithImage:image landscapeImagePhone:landscapeImagePhone style:style target:target action:action];
[self setup];
return self;
}
@end