Skip to content

Commit e7624e6

Browse files
authored
Merge pull request #130 from MosheBerman/fix/129-performance
Fix/129 performance
2 parents 29809e8 + a3caefc commit e7624e6

File tree

20 files changed

+306
-416
lines changed

20 files changed

+306
-416
lines changed

CHANGELOG.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
## [Unreleased]
44

5+
6+
## [5.0.4] 2017-09-05
7+
### Added
8+
- Added an in-memory cache for date formatters.
9+
10+
### Changed
11+
- Performance gains of about 60-75% when scrubbing
12+
- Audited `CKCalendarCell` for performance, including aggressive checking for changes before assigning new states, and reduced number of styling passes.
13+
- Cache a string representation of the custom cell reuse identifier when we change the cell class instead of computing it at each call to `dequeue...`
14+
15+
### Removed
16+
- Removed UIView(Borders), UIColor(HexString) and NSString(ToColor) categories for colors and borders.
17+
18+
519
## [5.0.3] 2017-08-21
620
- Made some more adjustments to Xcode schemes for tests.
721
- Reformatted changelog to match keepachangelog.com
@@ -125,8 +139,9 @@
125139
### Added
126140
Initial release.
127141

128-
[unreleased]: https://github.com/mosheberman/MBCalendarKit/compare/5.0.3...HEAD
129-
[5.0.3]: https://github.com/mosheberman/MBCalendarKit/compare/5.0.0...5.0.3
142+
[unreleased]: https://github.com/mosheberman/MBCalendarKit/compare/5.0.4...HEAD
143+
[5.0.3]: https://github.com/mosheberman/MBCalendarKit/compare/5.0.3...5.0.4
144+
[5.0.3]: https://github.com/mosheberman/MBCalendarKit/compare/5.0.2...5.0.3
130145
[5.0.2]: https://github.com/mosheberman/MBCalendarKit/compare/5.0.1...5.0.2
131146
[5.0.1]: https://github.com/mosheberman/MBCalendarKit/compare/5.0.0...5.0.1
132147
[5.0.0]: https://github.com/mosheberman/MBCalendarKit/compare/4.0.1...5.0.0
@@ -150,4 +165,4 @@ Initial release.
150165
[1.1.1]: https://github.com/mosheberman/MBCalendarKit/compare/1.1.0...1.1.1
151166
[1.1.0]: https://github.com/mosheberman/MBCalendarKit/compare/1.0.1...1.1.0
152167
[1.0.1]: https://github.com/mosheberman/MBCalendarKit/compare/1.0.0...1.0.1
153-
[1.0.0]: https://github.com/mosheberman/MBCalendarKit/compare/1.0.0...HEAD
168+
[1.0.0]: https://github.com/mosheberman/MBCalendarKit/compare/1.0.0...HEAD

MBCalendarKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "MBCalendarKit"
4-
s.version = "5.0.3"
4+
s.version = "5.0.4"
55
s.summary = "An open source calendar library for iOS."
66
s.description = <<-DESC
77
MBCalendarKit is a calendar library for iOS. It offers a flexible calendar control, with support for displaying any calendar system supported by `NSCalendar`. It also includes an API to customize the calendar cells. Recently rewritten, it now has first-class support for Swift interoperability. It also ships with a prebuilt view controller, inspired by the original iOS calendar. For a full list of features, check out the Readme.

MBCalendarKit.xcodeproj/project.pbxproj

Lines changed: 24 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
4604E1471F4658CB00F1F50B /* MBCalendarKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 464A870F171F174D00E7AB19 /* MBCalendarKitTests.m */; };
1111
46087AD81F3C2D80004655C6 /* CKCalendarModel+GridViewSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 46087AD61F3C2D80004655C6 /* CKCalendarModel+GridViewSupport.h */; };
1212
46087AD91F3C2D80004655C6 /* CKCalendarModel+GridViewSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 46087AD71F3C2D80004655C6 /* CKCalendarModel+GridViewSupport.m */; };
13+
460BD68C1F5FA5E7001CBD75 /* CKCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 460BD68A1F5FA5E7001CBD75 /* CKCache.h */; };
14+
460BD68D1F5FA5E7001CBD75 /* CKCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 460BD68B1F5FA5E7001CBD75 /* CKCache.m */; };
1315
461C706D1F46292000E305E3 /* DemoApp.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 461C704D1F46292000E305E3 /* DemoApp.storyboard */; };
1416
461C706E1F46292000E305E3 /* CKAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 461C70521F46292000E305E3 /* CKAppDelegate.m */; };
1517
461C706F1F46292000E305E3 /* AlternateCalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 461C70551F46292000E305E3 /* AlternateCalendarViewController.swift */; };
@@ -55,12 +57,6 @@
5557
467B12C21F2F547500CABA27 /* NSDate+Description.m in Sources */ = {isa = PBXBuildFile; fileRef = 464A86DD171F174D00E7AB19 /* NSDate+Description.m */; };
5658
467B12C31F2F547500CABA27 /* NSDateComponents+AllComponents.h in Headers */ = {isa = PBXBuildFile; fileRef = 464A86DE171F174D00E7AB19 /* NSDateComponents+AllComponents.h */; settings = {ATTRIBUTES = (Public, ); }; };
5759
467B12C41F2F547500CABA27 /* NSDateComponents+AllComponents.m in Sources */ = {isa = PBXBuildFile; fileRef = 464A86DF171F174D00E7AB19 /* NSDateComponents+AllComponents.m */; };
58-
467B12C51F2F547500CABA27 /* NSString+Color.h in Headers */ = {isa = PBXBuildFile; fileRef = 464A86E0171F174D00E7AB19 /* NSString+Color.h */; settings = {ATTRIBUTES = (Public, ); }; };
59-
467B12C61F2F547500CABA27 /* NSString+Color.m in Sources */ = {isa = PBXBuildFile; fileRef = 464A86E1171F174D00E7AB19 /* NSString+Color.m */; };
60-
467B12C71F2F547500CABA27 /* UIColor+HexString.h in Headers */ = {isa = PBXBuildFile; fileRef = 464A86E3171F174D00E7AB19 /* UIColor+HexString.h */; settings = {ATTRIBUTES = (Public, ); }; };
61-
467B12C81F2F547500CABA27 /* UIColor+HexString.m in Sources */ = {isa = PBXBuildFile; fileRef = 464A86E4171F174D00E7AB19 /* UIColor+HexString.m */; };
62-
467B12CB1F2F547500CABA27 /* UIView+Border.h in Headers */ = {isa = PBXBuildFile; fileRef = 464A86E8171F174D00E7AB19 /* UIView+Border.h */; settings = {ATTRIBUTES = (Public, ); }; };
63-
467B12CC1F2F547500CABA27 /* UIView+Border.m in Sources */ = {isa = PBXBuildFile; fileRef = 464A86E9171F174D00E7AB19 /* UIView+Border.m */; };
6460
467B12CD1F2F547500CABA27 /* CKCalendarCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 464A86EC171F174D00E7AB19 /* CKCalendarCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
6561
467B12CE1F2F547500CABA27 /* CKCalendarCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 464A86ED171F174D00E7AB19 /* CKCalendarCell.m */; };
6662
467B12CF1F2F547500CABA27 /* CKCalendarEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 464A86EE171F174D00E7AB19 /* CKCalendarEvent.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -157,6 +153,8 @@
157153
/* Begin PBXFileReference section */
158154
46087AD61F3C2D80004655C6 /* CKCalendarModel+GridViewSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CKCalendarModel+GridViewSupport.h"; path = "Model/CKCalendarModel+GridViewSupport.h"; sourceTree = "<group>"; };
159155
46087AD71F3C2D80004655C6 /* CKCalendarModel+GridViewSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "CKCalendarModel+GridViewSupport.m"; path = "Model/CKCalendarModel+GridViewSupport.m"; sourceTree = "<group>"; };
156+
460BD68A1F5FA5E7001CBD75 /* CKCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKCache.h; path = Caches/CKCache.h; sourceTree = "<group>"; };
157+
460BD68B1F5FA5E7001CBD75 /* CKCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKCache.m; path = Caches/CKCache.m; sourceTree = "<group>"; };
160158
461C704A1F46291100E305E3 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = MBCalendarKit/Info.plist; sourceTree = SOURCE_ROOT; };
161159
461C704E1F46292000E305E3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/DemoApp.storyboard; sourceTree = "<group>"; };
162160
461C70511F46292000E305E3 /* CKAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CKAppDelegate.h; sourceTree = "<group>"; };
@@ -205,12 +203,6 @@
205203
464A86DD171F174D00E7AB19 /* NSDate+Description.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+Description.m"; sourceTree = "<group>"; };
206204
464A86DE171F174D00E7AB19 /* NSDateComponents+AllComponents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDateComponents+AllComponents.h"; sourceTree = "<group>"; };
207205
464A86DF171F174D00E7AB19 /* NSDateComponents+AllComponents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDateComponents+AllComponents.m"; sourceTree = "<group>"; };
208-
464A86E0171F174D00E7AB19 /* NSString+Color.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Color.h"; sourceTree = "<group>"; };
209-
464A86E1171F174D00E7AB19 /* NSString+Color.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Color.m"; sourceTree = "<group>"; };
210-
464A86E3171F174D00E7AB19 /* UIColor+HexString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+HexString.h"; sourceTree = "<group>"; };
211-
464A86E4171F174D00E7AB19 /* UIColor+HexString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+HexString.m"; sourceTree = "<group>"; };
212-
464A86E8171F174D00E7AB19 /* UIView+Border.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Border.h"; sourceTree = "<group>"; };
213-
464A86E9171F174D00E7AB19 /* UIView+Border.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Border.m"; sourceTree = "<group>"; };
214206
464A86EC171F174D00E7AB19 /* CKCalendarCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CKCalendarCell.h; sourceTree = "<group>"; };
215207
464A86ED171F174D00E7AB19 /* CKCalendarCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CKCalendarCell.m; sourceTree = "<group>"; };
216208
464A86EE171F174D00E7AB19 /* CKCalendarEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CKCalendarEvent.h; sourceTree = "<group>"; };
@@ -306,6 +298,15 @@
306298
name = Model;
307299
sourceTree = "<group>";
308300
};
301+
460BD6851F5FA4C4001CBD75 /* Caches */ = {
302+
isa = PBXGroup;
303+
children = (
304+
460BD68A1F5FA5E7001CBD75 /* CKCache.h */,
305+
460BD68B1F5FA5E7001CBD75 /* CKCache.m */,
306+
);
307+
name = Caches;
308+
sourceTree = "<group>";
309+
};
309310
461C704C1F46292000E305E3 /* Demo App */ = {
310311
isa = PBXGroup;
311312
children = (
@@ -416,8 +417,8 @@
416417
464A86CB171F174D00E7AB19 /* Categories */ = {
417418
isa = PBXGroup;
418419
children = (
420+
46C9172B1F5FB48C00C724CB /* UIKit */,
419421
464A86CC171F174D00E7AB19 /* Foundation */,
420-
464A86E2171F174D00E7AB19 /* UIKit */,
421422
);
422423
path = Categories;
423424
sourceTree = "<group>";
@@ -430,8 +431,6 @@
430431
464A86D9171F174D00E7AB19 /* NSDate */,
431432
464A86DE171F174D00E7AB19 /* NSDateComponents+AllComponents.h */,
432433
464A86DF171F174D00E7AB19 /* NSDateComponents+AllComponents.m */,
433-
464A86E0171F174D00E7AB19 /* NSString+Color.h */,
434-
464A86E1171F174D00E7AB19 /* NSString+Color.m */,
435434
);
436435
path = Foundation;
437436
sourceTree = "<group>";
@@ -462,25 +461,6 @@
462461
path = NSDate;
463462
sourceTree = "<group>";
464463
};
465-
464A86E2171F174D00E7AB19 /* UIKit */ = {
466-
isa = PBXGroup;
467-
children = (
468-
464A86E3171F174D00E7AB19 /* UIColor+HexString.h */,
469-
464A86E4171F174D00E7AB19 /* UIColor+HexString.m */,
470-
464A86E5171F174D00E7AB19 /* UIView */,
471-
);
472-
path = UIKit;
473-
sourceTree = "<group>";
474-
};
475-
464A86E5171F174D00E7AB19 /* UIView */ = {
476-
isa = PBXGroup;
477-
children = (
478-
464A86E8171F174D00E7AB19 /* UIView+Border.h */,
479-
464A86E9171F174D00E7AB19 /* UIView+Border.m */,
480-
);
481-
path = UIView;
482-
sourceTree = "<group>";
483-
};
484464
464A86EB171F174D00E7AB19 /* Core */ = {
485465
isa = PBXGroup;
486466
children = (
@@ -491,6 +471,7 @@
491471
464A86F3171F174D00E7AB19 /* CKCalendarView.m */,
492472
468C693B1F42C5BC00CCD4E4 /* Custom Calendar Cells */,
493473
46AA211C1F3DF13E00E5F832 /* Showing Events */,
474+
460BD6851F5FA4C4001CBD75 /* Caches */,
494475
);
495476
path = Core;
496477
sourceTree = "<group>";
@@ -609,6 +590,13 @@
609590
name = Products;
610591
sourceTree = "<group>";
611592
};
593+
46C9172B1F5FB48C00C724CB /* UIKit */ = {
594+
isa = PBXGroup;
595+
children = (
596+
);
597+
path = UIKit;
598+
sourceTree = "<group>";
599+
};
612600
/* End PBXGroup section */
613601

614602
/* Begin PBXHeadersBuildPhase section */
@@ -617,6 +605,7 @@
617605
buildActionMask = 2147483647;
618606
files = (
619607
46EF359B1F3C295700095A9E /* CKCalendarModel.h in Headers */,
608+
460BD68C1F5FA5E7001CBD75 /* CKCache.h in Headers */,
620609
46AA20DC1F3D36C800E5F832 /* CKCalendarModel+HeaderViewSupport.h in Headers */,
621610
467B12E11F2F547500CABA27 /* CKCalendarViewController.h in Headers */,
622611
467B12A91F2F544F00CABA27 /* MBCalendarKit.h in Headers */,
@@ -632,12 +621,9 @@
632621
467B12C31F2F547500CABA27 /* NSDateComponents+AllComponents.h in Headers */,
633622
468CDDE01F42DE5B008E628D /* CKCalendarCellContext.h in Headers */,
634623
46AA211F1F3DF35300E5F832 /* CKCalendarGridTransitionCollectionViewFlowLayout.h in Headers */,
635-
467B12C51F2F547500CABA27 /* NSString+Color.h in Headers */,
636624
46AA21221F3DF3EF00E5F832 /* CKCalendarGridTransitionDirection.h in Headers */,
637625
463690371F4028DB00DFE9D5 /* CKCalendarModel+GridViewAnimationSupport.h in Headers */,
638-
467B12C71F2F547500CABA27 /* UIColor+HexString.h in Headers */,
639626
46341C2C1F3A36380090FFAF /* CKCalendarGridView.h in Headers */,
640-
467B12CB1F2F547500CABA27 /* UIView+Border.h in Headers */,
641627
467B12CD1F2F547500CABA27 /* CKCalendarCell.h in Headers */,
642628
467B12CF1F2F547500CABA27 /* CKCalendarEvent.h in Headers */,
643629
467B12D11F2F547500CABA27 /* CKCalendarHeaderView.h in Headers */,
@@ -811,6 +797,7 @@
811797
46AA21201F3DF35300E5F832 /* CKCalendarGridTransitionCollectionViewFlowLayout.m in Sources */,
812798
467B12B51F2F547500CABA27 /* NSCalendar+Components.m in Sources */,
813799
463690381F4028DB00DFE9D5 /* CKCalendarModel+GridViewAnimationSupport.m in Sources */,
800+
460BD68D1F5FA5E7001CBD75 /* CKCache.m in Sources */,
814801
467B12B91F2F547500CABA27 /* NSCalendar+DateManipulation.m in Sources */,
815802
467B12BB1F2F547500CABA27 /* NSCalendar+Juncture.m in Sources */,
816803
467B12BD1F2F547500CABA27 /* NSCalendar+Ranges.m in Sources */,
@@ -823,11 +810,8 @@
823810
46EF359C1F3C295700095A9E /* CKCalendarModel.m in Sources */,
824811
46AA20DD1F3D36C800E5F832 /* CKCalendarModel+HeaderViewSupport.m in Sources */,
825812
46363C2E1F394393002BA215 /* README.md in Sources */,
826-
467B12C61F2F547500CABA27 /* NSString+Color.m in Sources */,
827-
467B12C81F2F547500CABA27 /* UIColor+HexString.m in Sources */,
828813
468CDDCE1F42CBEC008E628D /* CKCalendarView+DefaultCellProviderImplementation.m in Sources */,
829814
46363C2D1F394393002BA215 /* LICENSE.md in Sources */,
830-
467B12CC1F2F547500CABA27 /* UIView+Border.m in Sources */,
831815
467B12CE1F2F547500CABA27 /* CKCalendarCell.m in Sources */,
832816
467B12D01F2F547500CABA27 /* CKCalendarEvent.m in Sources */,
833817
467B12D21F2F547500CABA27 /* CKCalendarHeaderView.m in Sources */,

MBCalendarKit/CalendarKit/Categories/Foundation/NSDate/NSDate+Description.m

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,21 @@
77
//
88

99
#import "NSDate+Description.h"
10+
#import "CKCache.h"
1011

1112
@implementation NSDate (Description)
1213

1314
- (NSString *)description
1415
{
15-
NSDateFormatter *formatter = [NSDateFormatter new];
16+
NSDateFormatter *formatter = CKCache.sharedCache.dateFormatter;
1617
formatter.timeStyle = NSDateFormatterNoStyle;
1718
formatter.dateStyle = NSDateFormatterLongStyle;
1819
return [formatter stringFromDate:self];
1920
}
2021

2122
- (NSString *)dayNameOnCalendar:(NSCalendar *)calendar
2223
{
23-
NSDateFormatter *f = [NSDateFormatter new];
24+
NSDateFormatter *f = CKCache.sharedCache.dateFormatter;
2425
f.calendar = calendar;
2526
f.locale = calendar.locale;
2627
[f setLocalizedDateFormatFromTemplate: @"ccc"];
@@ -29,7 +30,7 @@ - (NSString *)dayNameOnCalendar:(NSCalendar *)calendar
2930

3031
- (NSString *)monthNameOnCalendar:(NSCalendar *)calendar
3132
{
32-
NSDateFormatter *f = [NSDateFormatter new];
33+
NSDateFormatter *f = CKCache.sharedCache.dateFormatter;
3334
f.calendar = calendar;
3435
f.locale = calendar.locale;
3536
[f setLocalizedDateFormatFromTemplate:@"MMMM"];
@@ -38,7 +39,7 @@ - (NSString *)monthNameOnCalendar:(NSCalendar *)calendar
3839

3940
- (NSString *)monthAndYearOnCalendar:(NSCalendar *)calendar
4041
{
41-
NSDateFormatter *f = [NSDateFormatter new];
42+
NSDateFormatter *f = CKCache.sharedCache.dateFormatter;
4243
f.calendar = calendar;
4344
f.locale = calendar.locale;
4445
[f setLocalizedDateFormatFromTemplate:@"MMMM yyyy"];
@@ -47,7 +48,7 @@ - (NSString *)monthAndYearOnCalendar:(NSCalendar *)calendar
4748

4849
- (NSString *)monthAbbreviationAndYearOnCalendar:(NSCalendar *)calendar
4950
{
50-
NSDateFormatter *f = [NSDateFormatter new];
51+
NSDateFormatter *f = CKCache.sharedCache.dateFormatter;
5152
f.calendar = calendar;
5253
f.locale = calendar.locale;
5354
[f setLocalizedDateFormatFromTemplate:@"MMM yyyy"];
@@ -57,7 +58,7 @@ - (NSString *)monthAbbreviationAndYearOnCalendar:(NSCalendar *)calendar
5758

5859
- (NSString *)monthAbbreviationOnCalendar:(NSCalendar *)calendar
5960
{
60-
NSDateFormatter *f = [NSDateFormatter new];
61+
NSDateFormatter *f = CKCache.sharedCache.dateFormatter;
6162
f.calendar = calendar;
6263
f.locale = calendar.locale;
6364
[f setLocalizedDateFormatFromTemplate:@"MMM"];
@@ -66,7 +67,7 @@ - (NSString *)monthAbbreviationOnCalendar:(NSCalendar *)calendar
6667

6768
- (NSString *)monthAndDayOnCalendar:(NSCalendar *)calendar
6869
{
69-
NSDateFormatter *f = [NSDateFormatter new];
70+
NSDateFormatter *f = CKCache.sharedCache.dateFormatter;
7071
f.calendar = calendar;
7172
f.locale = calendar.locale;
7273
[f setLocalizedDateFormatFromTemplate:@"MMM d"];
@@ -75,7 +76,7 @@ - (NSString *)monthAndDayOnCalendar:(NSCalendar *)calendar
7576

7677
- (NSString *)dayOfMonthOnCalendar:(NSCalendar *)calendar
7778
{
78-
NSDateFormatter *f = [NSDateFormatter new];
79+
NSDateFormatter *f = CKCache.sharedCache.dateFormatter;
7980
f.calendar = calendar;
8081
f.locale = calendar.locale;
8182
[f setLocalizedDateFormatFromTemplate:@"d"];
@@ -84,7 +85,7 @@ - (NSString *)dayOfMonthOnCalendar:(NSCalendar *)calendar
8485

8586
- (NSString *)monthAndDayAndYearOnCalendar:(NSCalendar *)calendar
8687
{
87-
NSDateFormatter *f = [NSDateFormatter new];
88+
NSDateFormatter *f = CKCache.sharedCache.dateFormatter;
8889
f.calendar = calendar;
8990
f.locale = calendar.locale;
9091
[f setLocalizedDateFormatFromTemplate:@"MMM d yyyy"];
@@ -94,7 +95,7 @@ - (NSString *)monthAndDayAndYearOnCalendar:(NSCalendar *)calendar
9495

9596
- (NSString *)dayOfMonthAndYearOnCalendar:(NSCalendar *)calendar
9697
{
97-
NSDateFormatter *f = [NSDateFormatter new];
98+
NSDateFormatter *f = CKCache.sharedCache.dateFormatter;
9899
f.calendar = calendar;
99100
f.locale = calendar.locale;
100101
[f setLocalizedDateFormatFromTemplate:@"d yyyy"];

MBCalendarKit/CalendarKit/Categories/Foundation/NSString+Color.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

MBCalendarKit/CalendarKit/Categories/Foundation/NSString+Color.m

Lines changed: 0 additions & 25 deletions
This file was deleted.

MBCalendarKit/CalendarKit/Categories/UIKit/UIColor+HexString.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)