-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
FSCalendarAppearance.h
237 lines (188 loc) · 5.55 KB
/
FSCalendarAppearance.h
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
//
// FSCalendarAppearance.h
// Pods
//
// Created by DingWenchao on 6/29/15.
// Copyright © 2016 Wenchao Ding. All rights reserved.
//
// https://github.com/WenchaoD
//
#import "FSCalendarConstants.h"
@class FSCalendar;
typedef NS_ENUM(NSInteger, FSCalendarCellState) {
FSCalendarCellStateNormal = 0,
FSCalendarCellStateSelected = 1,
FSCalendarCellStatePlaceholder = 1 << 1,
FSCalendarCellStateDisabled = 1 << 2,
FSCalendarCellStateToday = 1 << 3,
FSCalendarCellStateWeekend = 1 << 4,
FSCalendarCellStateTodaySelected = FSCalendarCellStateToday|FSCalendarCellStateSelected
};
typedef NS_ENUM(NSUInteger, FSCalendarSeparators) {
FSCalendarSeparatorNone = 0,
FSCalendarSeparatorInterRows = 1
};
typedef NS_OPTIONS(NSUInteger, FSCalendarCaseOptions) {
FSCalendarCaseOptionsHeaderUsesDefaultCase = 0,
FSCalendarCaseOptionsHeaderUsesUpperCase = 1 << 0,
FSCalendarCaseOptionsHeaderUsesCapitalized = 1 << 1,
FSCalendarCaseOptionsWeekdayUsesDefaultCase = 0 << 4,
FSCalendarCaseOptionsWeekdayUsesUpperCase = 1 << 4,
FSCalendarCaseOptionsWeekdayUsesSingleUpperCase = 2 << 4,
};
/**
* FSCalendarAppearance determines the fonts and colors of components in the calendar.
*
* @see FSCalendarDelegateAppearance
*/
@interface FSCalendarAppearance : NSObject
/**
* The font of the day text.
*/
@property (strong, nonatomic) UIFont *titleFont;
/**
* The font of the subtitle text.
*/
@property (strong, nonatomic) UIFont *subtitleFont;
/**
* The font of the weekday text.
*/
@property (strong, nonatomic) UIFont *weekdayFont;
/**
* The font of the month text.
*/
@property (strong, nonatomic) UIFont *headerTitleFont;
/**
* The offset of the month header from default position.
*/
@property (assign, nonatomic) CGPoint headerTitleOffset;
/**
* The offset of the day text from default position.
*/
@property (assign, nonatomic) CGPoint titleOffset;
/**
* The offset of the day text from default position.
*/
@property (assign, nonatomic) CGPoint subtitleOffset;
/**
* The offset of the event dots from default position.
*/
@property (assign, nonatomic) CGPoint eventOffset;
/**
* The offset of the image from default position.
*/
@property (assign, nonatomic) CGPoint imageOffset;
/**
* The color of event dots.
*/
@property (strong, nonatomic) UIColor *eventDefaultColor;
/**
* The color of event dots.
*/
@property (strong, nonatomic) UIColor *eventSelectionColor;
/**
* The color of weekday text.
*/
@property (strong, nonatomic) UIColor *weekdayTextColor;
/**
* The color of month header text.
*/
@property (strong, nonatomic) UIColor *headerTitleColor;
/**
* The color oh month header separator
*/
@property (strong, nonatomic) UIColor *headerSeparatorColor;
/**
* The date format of the month header.
*/
@property (strong, nonatomic) NSString *headerDateFormat;
/**
* The text alignment of the month header.
*/
@property (assign, nonatomic) NSTextAlignment headerTitleAlignment;
/**
* The alpha value of month label staying on the fringes.
*/
@property (assign, nonatomic) CGFloat headerMinimumDissolvedAlpha;
/**
* The day text color for unselected state.
*/
@property (strong, nonatomic) UIColor *titleDefaultColor;
/**
* The day text color for selected state.
*/
@property (strong, nonatomic) UIColor *titleSelectionColor;
/**
* The day text color for today in the calendar.
*/
@property (strong, nonatomic) UIColor *titleTodayColor;
/**
* The day text color for days out of current month.
*/
@property (strong, nonatomic) UIColor *titlePlaceholderColor;
/**
* The day text color for weekend.
*/
@property (strong, nonatomic) UIColor *titleWeekendColor;
/**
* The subtitle text color for unselected state.
*/
@property (strong, nonatomic) UIColor *subtitleDefaultColor;
/**
* The subtitle text color for selected state.
*/
@property (strong, nonatomic) UIColor *subtitleSelectionColor;
/**
* The subtitle text color for today in the calendar.
*/
@property (strong, nonatomic) UIColor *subtitleTodayColor;
/**
* The subtitle text color for days out of current month.
*/
@property (strong, nonatomic) UIColor *subtitlePlaceholderColor;
/**
* The subtitle text color for weekend.
*/
@property (strong, nonatomic) UIColor *subtitleWeekendColor;
/**
* The fill color of the shape for selected state.
*/
@property (strong, nonatomic) UIColor *selectionColor;
/**
* The fill color of the shape for today.
*/
@property (strong, nonatomic) UIColor *todayColor;
/**
* The fill color of the shape for today and selected state.
*/
@property (strong, nonatomic) UIColor *todaySelectionColor;
/**
* The border color of the shape for unselected state.
*/
@property (strong, nonatomic) UIColor *borderDefaultColor;
/**
* The border color of the shape for selected state.
*/
@property (strong, nonatomic) UIColor *borderSelectionColor;
/**
* The border radius, while 1 means a circle, 0 means a rectangle, and the middle value will give it a corner radius.
*/
@property (assign, nonatomic) CGFloat borderRadius;
/**
* The case options manage the case of month label and weekday symbols.
*
* @see FSCalendarCaseOptions
*/
@property (assign, nonatomic) FSCalendarCaseOptions caseOptions;
/**
* The line integrations for calendar.
*
*/
@property (assign, nonatomic) FSCalendarSeparators separators;
#if TARGET_INTERFACE_BUILDER
// For preview only
@property (assign, nonatomic) BOOL fakeSubtitles;
@property (assign, nonatomic) BOOL fakeEventDots;
@property (assign, nonatomic) NSInteger fakedSelectedDay;
#endif
@end