Appearance : add `headerSeparatorColor` property

This commit is contained in:
Rémi Dayres 2020-01-24 15:19:28 +01:00
parent 714bc0e193
commit adba0b9a8d
3 changed files with 15 additions and 0 deletions

View File

@ -108,6 +108,11 @@ typedef NS_OPTIONS(NSUInteger, FSCalendarCaseOptions) {
*/
@property (strong, nonatomic) UIColor *headerTitleColor;
/**
* The color oh month header separator
*/
@property (strong, nonatomic) UIColor *headerSeparatorColor;
/**
* The date format of the month header.
*/

View File

@ -36,6 +36,7 @@
_headerTitleFont = [UIFont systemFontOfSize:FSCalendarStandardHeaderTextSize];
_headerTitleColor = FSCalendarStandardTitleTextColor;
_headerSeparatorColor = FSCalendarStandardLineColor;
_headerDateFormat = @"MMMM yyyy";
_headerMinimumDissolvedAlpha = 0.2;
_weekdayTextColor = FSCalendarStandardTitleTextColor;
@ -409,6 +410,14 @@
}
}
- (void)setHeaderSeparatorColor:(UIColor *)headerSeparatorColor
{
if (![_headerSeparatorColor isEqual:headerSeparatorColor]) {
_headerSeparatorColor = headerSeparatorColor;
[self.calendar configureAppearance];
}
}
- (void)setHeaderMinimumDissolvedAlpha:(CGFloat)headerMinimumDissolvedAlpha
{
if (_headerMinimumDissolvedAlpha != headerMinimumDissolvedAlpha) {

View File

@ -95,6 +95,7 @@
_titleLabel.font = self.calendar.appearance.headerTitleFont;
_titleLabel.textColor = self.calendar.appearance.headerTitleColor;
_titleLabel.textAlignment = self.calendar.appearance.headerTitleAlignment;
_bottomBorder.backgroundColor = self.calendar.appearance.headerSeparatorColor;
[self.weekdayView configureAppearance];
}