-
Notifications
You must be signed in to change notification settings - Fork 8
/
ILSideScrollViewItem.m
47 lines (37 loc) · 1.32 KB
/
ILSideScrollViewItem.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
//
// ILSideScrollViewItem.m
// ILSideScrollViewDemo
//
// Created by Isaac Lim on 1/6/13.
// Copyright (c) 2013 isaacl.net. All rights reserved.
//
#define kILSideScrollViewItemBkgColor [UIColor whiteColor]
#define kILSideScrollViewItemDefaultTitleColor [UIColor blackColor]
#define kILSideScrollViewItemSelectedTitleColor [UIColor grayColor]
#define kILSideScrollViewItemTitleFont [UIFont boldSystemFontOfSize:18]
#import "ILSideScrollViewItem.h"
@interface ILSideScrollViewItem()
@property (nonatomic) id target;
@property (nonatomic) SEL action;
@property (nonatomic) id object;
@end
@implementation ILSideScrollViewItem
+ (ILSideScrollViewItem *)item {
ILSideScrollViewItem *newItem = [[ILSideScrollViewItem alloc] init];
newItem.title = nil;
newItem.backgroundColor = kILSideScrollViewItemBkgColor;
newItem.defaultBackgroundImage = nil;
newItem.selectedBackgroundImage = nil;
newItem.target = nil;
newItem.action = nil;
newItem.defaultTitleColor = kILSideScrollViewItemDefaultTitleColor;
newItem.selectedTitleColor = kILSideScrollViewItemSelectedTitleColor;
newItem.titleFont = kILSideScrollViewItemTitleFont;
return newItem;
}
- (void)setTarget:(id)target action:(SEL)action withObject:(id)object {
self.target = target;
self.action = action;
self.object = object;
}
@end