From f85ea5c420e3dbfd78ec0469e2e5bdfac0b714b9 Mon Sep 17 00:00:00 2001 From: "E. Maloney" Date: Mon, 23 Mar 2015 00:53:20 -0400 Subject: [PATCH] Add 8 new behavior attributes for custom colors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • CLCalendarPastDayNumberTextColor — The day-of-month number text color for dates in the past • CLCalendarFutureDayNumberTextColor – The day-of-month number text color for dates in the future • CLCalendarCurrentDayNumberTextColor — The day-of-month number text color for today • CLCalendarSelectedDayNumberTextColor — The day-of-month number text color for the selected day when that date is not today • CLCalendarSelectedCurrentDayNumberTextColor — The day-of-month number text color for the selected day when that date is today • CLCalendarCurrentDayNumberBackgroundColor — The background color to use for the highlight circle behind the current day when that date isn't selected • CLCalendarSelectedDayNumberBackgroundColor — The background color to use for the highlight circle behind the selected day when that date is not today • CLCalendarSelectedCurrentDayNumberBackgroundColor — The background color to use for the highlight circle behind the selected day when that date is today --- .../CLWeeklyCalendarView.h | 8 +++ .../CLWeeklyCalendarView.m | 55 ++++++++++++++++++- .../DailyCalendarView.h | 9 +++ .../DailyCalendarView.m | 15 ++--- 4 files changed, 77 insertions(+), 10 deletions(-) diff --git a/CLWeeklyCalendarView/CLWeeklyCalendarViewSourceCode/CLWeeklyCalendarView.h b/CLWeeklyCalendarView/CLWeeklyCalendarViewSourceCode/CLWeeklyCalendarView.h index 62bb9f2..fa0c6d5 100644 --- a/CLWeeklyCalendarView/CLWeeklyCalendarViewSourceCode/CLWeeklyCalendarView.h +++ b/CLWeeklyCalendarView/CLWeeklyCalendarViewSourceCode/CLWeeklyCalendarView.h @@ -12,6 +12,14 @@ // Keys for customize the calendar behavior extern NSString *const CLCalendarWeekStartDay; //The Day of weekStart from 1 - 7 - Default: 1 extern NSString *const CLCalendarDayTitleTextColor; //Day Title text color, Mon, Tue, etc label text color +extern NSString *const CLCalendarPastDayNumberTextColor; //Day number text color for dates in the past +extern NSString *const CLCalendarFutureDayNumberTextColor; //Day number text color for dates in the future +extern NSString *const CLCalendarCurrentDayNumberTextColor; //Day number text color for today +extern NSString *const CLCalendarSelectedDayNumberTextColor; //Day number text color for the selected day +extern NSString *const CLCalendarSelectedCurrentDayNumberTextColor; //Day number text color when today is selected +extern NSString *const CLCalendarCurrentDayNumberBackgroundColor; //Day number background color for today when not selected +extern NSString *const CLCalendarSelectedDayNumberBackgroundColor; //Day number background color for selected day +extern NSString *const CLCalendarSelectedCurrentDayNumberBackgroundColor; //Day number background color when today is selected extern NSString *const CLCalendarSelectedDatePrintFormat; //Selected Date print format, - Default: @"EEE, d MMM yyyy" extern NSString *const CLCalendarSelectedDatePrintColor; //Selected Date print text color -Default: [UIColor whiteColor] extern NSString *const CLCalendarSelectedDatePrintFontSize; //Selected Date print font size - Default : 13.f diff --git a/CLWeeklyCalendarView/CLWeeklyCalendarViewSourceCode/CLWeeklyCalendarView.m b/CLWeeklyCalendarView/CLWeeklyCalendarViewSourceCode/CLWeeklyCalendarView.m index 3f9ddc5..1e09c65 100644 --- a/CLWeeklyCalendarView/CLWeeklyCalendarViewSourceCode/CLWeeklyCalendarView.m +++ b/CLWeeklyCalendarView/CLWeeklyCalendarViewSourceCode/CLWeeklyCalendarView.m @@ -36,6 +36,14 @@ //Attribute Keys NSString *const CLCalendarWeekStartDay = @"CLCalendarWeekStartDay"; NSString *const CLCalendarDayTitleTextColor = @"CLCalendarDayTitleTextColor"; +NSString *const CLCalendarPastDayNumberTextColor = @"CLCalendarPastDayNumberTextColor"; +NSString *const CLCalendarFutureDayNumberTextColor = @"CLCalendarFutureDayNumberTextColor"; +NSString *const CLCalendarCurrentDayNumberTextColor = @"CLCalendarCurrentDayNumberTextColor"; +NSString *const CLCalendarSelectedDayNumberTextColor = @"CLCalendarSelectedDayNumberTextColor"; +NSString *const CLCalendarSelectedCurrentDayNumberTextColor = @"CLCalendarSelectedCurrentDayNumberTextColor"; +NSString *const CLCalendarCurrentDayNumberBackgroundColor = @"CLCalendarCurrentDayNumberBackgroundColor"; +NSString *const CLCalendarSelectedDayNumberBackgroundColor = @"CLCalendarSelectedDayNumberBackgroundColor"; +NSString *const CLCalendarSelectedCurrentDayNumberBackgroundColor = @"CLCalendarSelectedCurrentDayNumberBackgroundColor"; NSString *const CLCalendarSelectedDatePrintFormat = @"CLCalendarSelectedDatePrintFormat"; NSString *const CLCalendarSelectedDatePrintColor = @"CLCalendarSelectedDatePrintColor"; NSString *const CLCalendarSelectedDatePrintFontSize = @"CLCalendarSelectedDatePrintFontSize"; @@ -44,6 +52,14 @@ //Default Values static NSInteger const CLCalendarWeekStartDayDefault = 1; static NSInteger const CLCalendarDayTitleTextColorDefault = 0xC2E8FF; +static NSInteger const CLCalendarPastDayNumberTextColorDefault = 0x7BD1FF; +static NSInteger const CLCalendarFutureDayNumberTextColorDefault = 0xFFFFFF; +static NSInteger const CLCalendarCurrentDayNumberTextColorDefault = 0xFFFFFF; +static NSInteger const CLCalendarSelectedDayNumberTextColorDefault = 0x34A1FF; +static NSInteger const CLCalendarSelectedCurrentDayNumberTextColorDefault = 0x0081c1; +static NSInteger const CLCalendarCurrentDayNumberBackgroundColorDefault = 0x0081c1; +static NSInteger const CLCalendarSelectedDayNumberBackgroundColorDefault = 0xffffff; +static NSInteger const CLCalendarSelectedCurrentDayNumberBackgroundColorDefault = 0xffffff; static NSString* const CLCalendarSelectedDatePrintFormatDefault = @"EEE, d MMM yyyy"; static float const CLCalendarSelectedDatePrintFontSizeDefault = 13.f; @@ -63,6 +79,14 @@ @interface CLWeeklyCalendarView()