@@ -29,52 +29,52 @@ - (instancetype)init
29
29
{
30
30
self = [super init ];
31
31
if (self) {
32
-
32
+
33
33
_titleFont = [UIFont systemFontOfSize: FSCalendarStandardTitleTextSize];
34
34
_subtitleFont = [UIFont systemFontOfSize: FSCalendarStandardSubtitleTextSize];
35
35
_weekdayFont = [UIFont systemFontOfSize: FSCalendarStandardWeekdayTextSize];
36
36
_headerTitleFont = [UIFont systemFontOfSize: FSCalendarStandardHeaderTextSize];
37
-
37
+
38
38
_headerTitleColor = FSCalendarStandardTitleTextColor;
39
39
_headerDateFormat = @" MMMM yyyy" ;
40
40
_headerMinimumDissolvedAlpha = 0.2 ;
41
41
_weekdayTextColor = FSCalendarStandardTitleTextColor;
42
42
_caseOptions = FSCalendarCaseOptionsHeaderUsesDefaultCase|FSCalendarCaseOptionsWeekdayUsesDefaultCase;
43
-
43
+
44
44
_backgroundColors = [NSMutableDictionary dictionaryWithCapacity: 5 ];
45
45
_backgroundColors[@(FSCalendarCellStateNormal)] = [UIColor clearColor ];
46
46
_backgroundColors[@(FSCalendarCellStateSelected)] = FSCalendarStandardSelectionColor;
47
47
_backgroundColors[@(FSCalendarCellStateDisabled)] = [UIColor clearColor ];
48
48
_backgroundColors[@(FSCalendarCellStatePlaceholder)] = [UIColor clearColor ];
49
49
_backgroundColors[@(FSCalendarCellStateToday)] = FSCalendarStandardTodayColor;
50
-
50
+
51
51
_titleColors = [NSMutableDictionary dictionaryWithCapacity: 5 ];
52
52
_titleColors[@(FSCalendarCellStateNormal)] = [UIColor blackColor ];
53
53
_titleColors[@(FSCalendarCellStateSelected)] = [UIColor whiteColor ];
54
54
_titleColors[@(FSCalendarCellStateDisabled)] = [UIColor grayColor ];
55
55
_titleColors[@(FSCalendarCellStatePlaceholder)] = [UIColor lightGrayColor ];
56
56
_titleColors[@(FSCalendarCellStateToday)] = [UIColor whiteColor ];
57
-
57
+
58
58
_subtitleColors = [NSMutableDictionary dictionaryWithCapacity: 5 ];
59
59
_subtitleColors[@(FSCalendarCellStateNormal)] = [UIColor darkGrayColor ];
60
60
_subtitleColors[@(FSCalendarCellStateSelected)] = [UIColor whiteColor ];
61
61
_subtitleColors[@(FSCalendarCellStateDisabled)] = [UIColor lightGrayColor ];
62
62
_subtitleColors[@(FSCalendarCellStatePlaceholder)] = [UIColor lightGrayColor ];
63
63
_subtitleColors[@(FSCalendarCellStateToday)] = [UIColor whiteColor ];
64
-
64
+
65
65
_borderColors[@(FSCalendarCellStateSelected)] = [UIColor clearColor ];
66
66
_borderColors[@(FSCalendarCellStateNormal)] = [UIColor clearColor ];
67
-
67
+
68
68
_borderRadius = 1.0 ;
69
69
_eventDefaultColor = FSCalendarStandardEventDotColor;
70
70
_eventSelectionColor = FSCalendarStandardEventDotColor;
71
-
71
+
72
72
_borderColors = [NSMutableDictionary dictionaryWithCapacity: 2 ];
73
-
73
+
74
74
#if TARGET_INTERFACE_BUILDER
75
75
_fakeEventDots = YES ;
76
76
#endif
77
-
77
+
78
78
}
79
79
return self;
80
80
}
@@ -492,22 +492,22 @@ - (FSCalendarCellShape)cellShape
492
492
493
493
- (void )setTitleTextSize : (CGFloat )titleTextSize
494
494
{
495
- self.titleFont = [UIFont fontWithName: self .titleFont.fontName size : titleTextSize];
495
+ self.titleFont = [self .titleFont fontWithSize : titleTextSize];
496
496
}
497
497
498
498
- (void )setSubtitleTextSize : (CGFloat )subtitleTextSize
499
499
{
500
- self.subtitleFont = [UIFont fontWithName: self .subtitleFont.fontName size : subtitleTextSize];
500
+ self.subtitleFont = [self .subtitleFont fontWithSize : subtitleTextSize];
501
501
}
502
502
503
503
- (void )setWeekdayTextSize : (CGFloat )weekdayTextSize
504
504
{
505
- self.weekdayFont = [UIFont fontWithName: self .weekdayFont.fontName size : weekdayTextSize];
505
+ self.weekdayFont = [self .weekdayFont fontWithSize : weekdayTextSize];
506
506
}
507
507
508
508
- (void )setHeaderTitleTextSize : (CGFloat )headerTitleTextSize
509
509
{
510
- self.headerTitleFont = [UIFont fontWithName: self .headerTitleFont.fontName size : headerTitleTextSize];
510
+ self.headerTitleFont = [self .headerTitleFont fontWithSize : headerTitleTextSize];
511
511
}
512
512
513
513
- (void )invalidateAppearance
0 commit comments