Compare commits
52 Commits
multiple-w
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
5c12d8ce9e | |
|
|
e593f6dd49 | |
|
|
b3981a3c82 | |
|
|
2ca467918f | |
|
|
f00d48d78d | |
|
|
ec1a57f874 | |
|
|
5a8153b171 | |
|
|
7fac27e471 | |
|
|
7c5d8c6463 | |
|
|
c4a443ac79 | |
|
|
36250386e7 | |
|
|
390ed2804a | |
|
|
fea05cb3a4 | |
|
|
1fcac94940 | |
|
|
f6a766d6d6 | |
|
|
4e79a201fa | |
|
|
105d8c3592 | |
|
|
0ff2e76087 | |
|
|
7fd27f977f | |
|
|
2e6157b307 | |
|
|
617168f216 | |
|
|
4fcf0d8d1d | |
|
|
b60ee2cfb3 | |
|
|
7ba522186d | |
|
|
ad65db6cb4 | |
|
|
725a33a29f | |
|
|
b3fe27254a | |
|
|
75deddd041 | |
|
|
7a749bfa1f | |
|
|
252ff40cc9 | |
|
|
ba15ebc620 | |
|
|
4ae56376e9 | |
|
|
adba0b9a8d | |
|
|
714bc0e193 | |
|
|
f1afcea1e9 | |
|
|
ee0a887d8b | |
|
|
79d413ddd8 | |
|
|
b869b05450 | |
|
|
b11baf61d1 | |
|
|
8a2d4b3904 | |
|
|
a5a4aff301 | |
|
|
1f859e0b9f | |
|
|
d463806165 | |
|
|
f3653ba822 | |
|
|
ee9220cb2a | |
|
|
cdbb9ec7ca | |
|
|
473e88cb26 | |
|
|
b66d3133c0 | |
|
|
b0653a3b69 | |
|
|
b47c17b617 | |
|
|
49d9408b06 | |
|
|
8792e46a2f |
|
|
@ -105,7 +105,7 @@
|
||||||
|
|
||||||
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
||||||
{
|
{
|
||||||
return [self.dateFormatter dateFromString:@"2016-07-08"];
|
return [self.dateFormatter dateFromString:@"2020-07-08"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
||||||
|
|
|
||||||
|
|
@ -42,68 +42,68 @@ NS_ASSUME_NONNULL_END
|
||||||
if (self) {
|
if (self) {
|
||||||
self.title = @"FSCalendar";
|
self.title = @"FSCalendar";
|
||||||
|
|
||||||
self.fillDefaultColors = @{@"2015/10/08":[UIColor purpleColor],
|
self.fillDefaultColors = @{@"2020/10/08":[UIColor purpleColor],
|
||||||
@"2015/10/06":[UIColor greenColor],
|
@"2020/10/06":[UIColor greenColor],
|
||||||
@"2015/10/18":[UIColor cyanColor],
|
@"2020/10/18":[UIColor cyanColor],
|
||||||
@"2015/10/22":[UIColor yellowColor],
|
@"2020/10/22":[UIColor yellowColor],
|
||||||
@"2015/11/08":[UIColor purpleColor],
|
@"2020/11/08":[UIColor purpleColor],
|
||||||
@"2015/11/06":[UIColor greenColor],
|
@"2020/11/06":[UIColor greenColor],
|
||||||
@"2015/11/18":[UIColor cyanColor],
|
@"2020/11/18":[UIColor cyanColor],
|
||||||
@"2015/11/22":[UIColor yellowColor],
|
@"2020/11/22":[UIColor yellowColor],
|
||||||
@"2015/12/08":[UIColor purpleColor],
|
@"2020/12/08":[UIColor purpleColor],
|
||||||
@"2015/12/06":[UIColor greenColor],
|
@"2020/12/06":[UIColor greenColor],
|
||||||
@"2015/12/18":[UIColor cyanColor],
|
@"2020/12/18":[UIColor cyanColor],
|
||||||
@"2015/12/22":[UIColor magentaColor]};
|
@"2020/12/22":[UIColor magentaColor]};
|
||||||
|
|
||||||
self.fillSelectionColors = @{@"2015/10/08":[UIColor greenColor],
|
self.fillSelectionColors = @{@"2020/10/08":[UIColor greenColor],
|
||||||
@"2015/10/06":[UIColor purpleColor],
|
@"2020/10/06":[UIColor purpleColor],
|
||||||
@"2015/10/17":[UIColor grayColor],
|
@"2020/10/17":[UIColor grayColor],
|
||||||
@"2015/10/21":[UIColor cyanColor],
|
@"2020/10/21":[UIColor cyanColor],
|
||||||
@"2015/11/08":[UIColor greenColor],
|
@"2020/11/08":[UIColor greenColor],
|
||||||
@"2015/11/06":[UIColor purpleColor],
|
@"2020/11/06":[UIColor purpleColor],
|
||||||
@"2015/11/17":[UIColor grayColor],
|
@"2020/11/17":[UIColor grayColor],
|
||||||
@"2015/11/21":[UIColor cyanColor],
|
@"2020/11/21":[UIColor cyanColor],
|
||||||
@"2015/12/08":[UIColor greenColor],
|
@"2020/12/08":[UIColor greenColor],
|
||||||
@"2015/12/06":[UIColor purpleColor],
|
@"2020/12/06":[UIColor purpleColor],
|
||||||
@"2015/12/17":[UIColor grayColor],
|
@"2020/12/17":[UIColor grayColor],
|
||||||
@"2015/12/21":[UIColor cyanColor]};
|
@"2020/12/21":[UIColor cyanColor]};
|
||||||
|
|
||||||
self.borderDefaultColors = @{@"2015/10/08":[UIColor brownColor],
|
self.borderDefaultColors = @{@"2020/10/08":[UIColor brownColor],
|
||||||
@"2015/10/17":[UIColor magentaColor],
|
@"2020/10/17":[UIColor magentaColor],
|
||||||
@"2015/10/21":FSCalendarStandardSelectionColor,
|
@"2020/10/21":FSCalendarStandardSelectionColor,
|
||||||
@"2015/10/25":[UIColor blackColor],
|
@"2020/10/25":[UIColor blackColor],
|
||||||
@"2015/11/08":[UIColor brownColor],
|
@"2020/11/08":[UIColor brownColor],
|
||||||
@"2015/11/17":[UIColor magentaColor],
|
@"2020/11/17":[UIColor magentaColor],
|
||||||
@"2015/11/21":FSCalendarStandardSelectionColor,
|
@"2020/11/21":FSCalendarStandardSelectionColor,
|
||||||
@"2015/11/25":[UIColor blackColor],
|
@"2020/11/25":[UIColor blackColor],
|
||||||
@"2015/12/08":[UIColor brownColor],
|
@"2020/12/08":[UIColor brownColor],
|
||||||
@"2015/12/17":[UIColor magentaColor],
|
@"2020/12/17":[UIColor magentaColor],
|
||||||
@"2015/12/21":FSCalendarStandardSelectionColor,
|
@"2020/12/21":FSCalendarStandardSelectionColor,
|
||||||
@"2015/12/25":[UIColor blackColor]};
|
@"2020/12/25":[UIColor blackColor]};
|
||||||
|
|
||||||
self.borderSelectionColors = @{@"2015/10/08":[UIColor redColor],
|
self.borderSelectionColors = @{@"2020/10/08":[UIColor redColor],
|
||||||
@"2015/10/17":[UIColor purpleColor],
|
@"2020/10/17":[UIColor purpleColor],
|
||||||
@"2015/10/21":FSCalendarStandardSelectionColor,
|
@"2020/10/21":FSCalendarStandardSelectionColor,
|
||||||
@"2015/10/25":FSCalendarStandardTodayColor,
|
@"2020/10/25":FSCalendarStandardTodayColor,
|
||||||
@"2015/11/08":[UIColor redColor],
|
@"2020/11/08":[UIColor redColor],
|
||||||
@"2015/11/17":[UIColor purpleColor],
|
@"2020/11/17":[UIColor purpleColor],
|
||||||
@"2015/11/21":FSCalendarStandardSelectionColor,
|
@"2020/11/21":FSCalendarStandardSelectionColor,
|
||||||
@"2015/11/25":FSCalendarStandardTodayColor,
|
@"2020/11/25":FSCalendarStandardTodayColor,
|
||||||
@"2015/12/08":[UIColor redColor],
|
@"2020/12/08":[UIColor redColor],
|
||||||
@"2015/12/17":[UIColor purpleColor],
|
@"2020/12/17":[UIColor purpleColor],
|
||||||
@"2015/12/21":FSCalendarStandardSelectionColor,
|
@"2020/12/21":FSCalendarStandardSelectionColor,
|
||||||
@"2015/12/25":FSCalendarStandardTodayColor};
|
@"2020/12/25":FSCalendarStandardTodayColor};
|
||||||
|
|
||||||
|
|
||||||
self.datesWithEvent = @[@"2015-10-03",
|
self.datesWithEvent = @[@"2020-10-03",
|
||||||
@"2015-10-06",
|
@"2020-10-06",
|
||||||
@"2015-10-12",
|
@"2020-10-12",
|
||||||
@"2015-10-25"];
|
@"2020-10-25"];
|
||||||
|
|
||||||
self.datesWithMultipleEvents = @[@"2015-10-08",
|
self.datesWithMultipleEvents = @[@"2020-10-08",
|
||||||
@"2015-10-16",
|
@"2020-10-16",
|
||||||
@"2015-10-20",
|
@"2020-10-20",
|
||||||
@"2015-10-28"];
|
@"2020-10-28"];
|
||||||
|
|
||||||
|
|
||||||
self.gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
|
self.gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
|
||||||
|
|
@ -134,7 +134,7 @@ NS_ASSUME_NONNULL_END
|
||||||
[self.view addSubview:calendar];
|
[self.view addSubview:calendar];
|
||||||
self.calendar = calendar;
|
self.calendar = calendar;
|
||||||
|
|
||||||
[calendar setCurrentPage:[self.dateFormatter1 dateFromString:@"2015/10/03"] animated:NO];
|
[calendar setCurrentPage:[self.dateFormatter1 dateFromString:@"2020/10/03"] animated:NO];
|
||||||
|
|
||||||
UIBarButtonItem *todayItem = [[UIBarButtonItem alloc] initWithTitle:@"TODAY" style:UIBarButtonItemStylePlain target:self action:@selector(todayItemClicked:)];
|
UIBarButtonItem *todayItem = [[UIBarButtonItem alloc] initWithTitle:@"TODAY" style:UIBarButtonItemStylePlain target:self action:@selector(todayItemClicked:)];
|
||||||
self.navigationItem.rightBarButtonItem = todayItem;
|
self.navigationItem.rightBarButtonItem = todayItem;
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@
|
||||||
30A495521DCAD9E6000B2F31 /* FSCalendarWeekdayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarWeekdayView.h; sourceTree = "<group>"; };
|
30A495521DCAD9E6000B2F31 /* FSCalendarWeekdayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarWeekdayView.h; sourceTree = "<group>"; };
|
||||||
30A495531DCAD9E6000B2F31 /* FSCalendarWeekdayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarWeekdayView.m; sourceTree = "<group>"; };
|
30A495531DCAD9E6000B2F31 /* FSCalendarWeekdayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarWeekdayView.m; sourceTree = "<group>"; };
|
||||||
30B0BABF1B8D8E22004B9476 /* FSCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendar.h; sourceTree = "<group>"; };
|
30B0BABF1B8D8E22004B9476 /* FSCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendar.h; sourceTree = "<group>"; };
|
||||||
30B0BAC01B8D8E22004B9476 /* FSCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = FSCalendar.m; sourceTree = "<group>"; };
|
30B0BAC01B8D8E22004B9476 /* FSCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = FSCalendar.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
|
||||||
30B0BAC11B8D8E22004B9476 /* FSCalendarAppearance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarAppearance.h; sourceTree = "<group>"; };
|
30B0BAC11B8D8E22004B9476 /* FSCalendarAppearance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarAppearance.h; sourceTree = "<group>"; };
|
||||||
30B0BAC21B8D8E22004B9476 /* FSCalendarAppearance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarAppearance.m; sourceTree = "<group>"; };
|
30B0BAC21B8D8E22004B9476 /* FSCalendarAppearance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarAppearance.m; sourceTree = "<group>"; };
|
||||||
30B0BAC31B8D8E22004B9476 /* FSCalendarCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = FSCalendarCell.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
30B0BAC31B8D8E22004B9476 /* FSCalendarCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = FSCalendarCell.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||||
|
|
@ -149,7 +149,6 @@
|
||||||
30B0BAC51B8D8E22004B9476 /* FSCalendarDynamicHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarDynamicHeader.h; sourceTree = "<group>"; };
|
30B0BAC51B8D8E22004B9476 /* FSCalendarDynamicHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarDynamicHeader.h; sourceTree = "<group>"; };
|
||||||
30B0BAC61B8D8E22004B9476 /* FSCalendarHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarHeaderView.h; sourceTree = "<group>"; };
|
30B0BAC61B8D8E22004B9476 /* FSCalendarHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarHeaderView.h; sourceTree = "<group>"; };
|
||||||
30B0BAC71B8D8E22004B9476 /* FSCalendarHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarHeaderView.m; sourceTree = "<group>"; };
|
30B0BAC71B8D8E22004B9476 /* FSCalendarHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarHeaderView.m; sourceTree = "<group>"; };
|
||||||
30B0BACA1B8D8E22004B9476 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
|
||||||
30CEF8FE1C950C1F008EAFB1 /* FSCalendarTransitionCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarTransitionCoordinator.h; sourceTree = "<group>"; };
|
30CEF8FE1C950C1F008EAFB1 /* FSCalendarTransitionCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarTransitionCoordinator.h; sourceTree = "<group>"; };
|
||||||
30CEF8FF1C950C1F008EAFB1 /* FSCalendarTransitionCoordinator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarTransitionCoordinator.m; sourceTree = "<group>"; };
|
30CEF8FF1C950C1F008EAFB1 /* FSCalendarTransitionCoordinator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarTransitionCoordinator.m; sourceTree = "<group>"; };
|
||||||
30D55B0E1C90240000BB43D5 /* HidePlaceholderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HidePlaceholderViewController.h; sourceTree = SOURCE_ROOT; };
|
30D55B0E1C90240000BB43D5 /* HidePlaceholderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HidePlaceholderViewController.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
|
@ -162,6 +161,7 @@
|
||||||
30FCB3951BAAD112002B87AD /* FSCalendarStickyHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarStickyHeader.m; sourceTree = "<group>"; };
|
30FCB3951BAAD112002B87AD /* FSCalendarStickyHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarStickyHeader.m; sourceTree = "<group>"; };
|
||||||
50F2ADE6216D954A00CC481F /* FSCalendarSeparatorDecorationView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FSCalendarSeparatorDecorationView.h; sourceTree = "<group>"; };
|
50F2ADE6216D954A00CC481F /* FSCalendarSeparatorDecorationView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FSCalendarSeparatorDecorationView.h; sourceTree = "<group>"; };
|
||||||
50F2ADE7216D954A00CC481F /* FSCalendarSeparatorDecorationView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FSCalendarSeparatorDecorationView.m; sourceTree = "<group>"; };
|
50F2ADE7216D954A00CC481F /* FSCalendarSeparatorDecorationView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FSCalendarSeparatorDecorationView.m; sourceTree = "<group>"; };
|
||||||
|
9C88197F25F26B2F00E180CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
EE0D7FC71B89C5D3003C287B /* FSCalendarExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FSCalendarExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
EE0D7FC71B89C5D3003C287B /* FSCalendarExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FSCalendarExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
EE0D7FCB1B89C5D3003C287B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
EE0D7FCB1B89C5D3003C287B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
EE52AE161B91E68A00016662 /* FSCalendarScopeExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarScopeExampleViewController.h; sourceTree = SOURCE_ROOT; };
|
EE52AE161B91E68A00016662 /* FSCalendarScopeExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarScopeExampleViewController.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
|
@ -261,6 +261,7 @@
|
||||||
30B0BABC1B8D8E22004B9476 /* FSCalendar */ = {
|
30B0BABC1B8D8E22004B9476 /* FSCalendar */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
9C88197F25F26B2F00E180CD /* Info.plist */,
|
||||||
30B0BABF1B8D8E22004B9476 /* FSCalendar.h */,
|
30B0BABF1B8D8E22004B9476 /* FSCalendar.h */,
|
||||||
30B0BAC01B8D8E22004B9476 /* FSCalendar.m */,
|
30B0BAC01B8D8E22004B9476 /* FSCalendar.m */,
|
||||||
30B0BAC11B8D8E22004B9476 /* FSCalendarAppearance.h */,
|
30B0BAC11B8D8E22004B9476 /* FSCalendarAppearance.h */,
|
||||||
|
|
@ -292,20 +293,11 @@
|
||||||
309225381B905C4300123031 /* FSCalendarConstants.h */,
|
309225381B905C4300123031 /* FSCalendarConstants.h */,
|
||||||
309225391B905C4300123031 /* FSCalendarConstants.m */,
|
309225391B905C4300123031 /* FSCalendarConstants.m */,
|
||||||
30B0BAC51B8D8E22004B9476 /* FSCalendarDynamicHeader.h */,
|
30B0BAC51B8D8E22004B9476 /* FSCalendarDynamicHeader.h */,
|
||||||
30B0BAF31B8D9A91004B9476 /* Supporting Files */,
|
|
||||||
);
|
);
|
||||||
name = FSCalendar;
|
name = FSCalendar;
|
||||||
path = ../FSCalendar;
|
path = ../FSCalendar;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
30B0BAF31B8D9A91004B9476 /* Supporting Files */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
30B0BACA1B8D8E22004B9476 /* Info.plist */,
|
|
||||||
);
|
|
||||||
name = "Supporting Files";
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
30D55B0D1C9023E400BB43D5 /* Hide Placeholders */ = {
|
30D55B0D1C9023E400BB43D5 /* Hide Placeholders */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
|
@ -588,7 +580,7 @@
|
||||||
};
|
};
|
||||||
buildConfigurationList = EE0D7FC21B89C5D3003C287B /* Build configuration list for PBXProject "FSCalendar" */;
|
buildConfigurationList = EE0D7FC21B89C5D3003C287B /* Build configuration list for PBXProject "FSCalendar" */;
|
||||||
compatibilityVersion = "Xcode 3.2";
|
compatibilityVersion = "Xcode 3.2";
|
||||||
developmentRegion = English;
|
developmentRegion = en;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
en,
|
en,
|
||||||
|
|
@ -894,7 +886,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
DEVELOPMENT_TEAM = HZF422TY46;
|
DEVELOPMENT_TEAM = HZF422TY46;
|
||||||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendarExample;
|
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendarExample;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
|
@ -908,7 +900,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
DEVELOPMENT_TEAM = HZF422TY46;
|
DEVELOPMENT_TEAM = HZF422TY46;
|
||||||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendarExample;
|
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendarExample;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
|
@ -931,8 +923,9 @@
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = "$(SRCROOT)/../FSCalendar/Info.plist";
|
INFOPLIST_FILE = "$(SRCROOT)/../FSCalendar/Info.plist";
|
||||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
|
MARKETING_VERSION = 2.8.3;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendar;
|
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendar;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
|
|
@ -953,8 +946,9 @@
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
INFOPLIST_FILE = "$(SRCROOT)/../FSCalendar/Info.plist";
|
INFOPLIST_FILE = "$(SRCROOT)/../FSCalendar/Info.plist";
|
||||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
|
MARKETING_VERSION = 2.8.3;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendar;
|
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendar;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1140"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "EE0D7FC61B89C5D3003C287B"
|
||||||
|
BuildableName = "FSCalendarExample.app"
|
||||||
|
BlueprintName = "FSCalendarExample"
|
||||||
|
ReferencedContainer = "container:FSCalendar.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<Testables>
|
||||||
|
<TestableReference
|
||||||
|
skipped = "NO">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "30671DC61D6D574C00BCFC4E"
|
||||||
|
BuildableName = "FSCalendarTests.xctest"
|
||||||
|
BlueprintName = "FSCalendarTests"
|
||||||
|
ReferencedContainer = "container:FSCalendar.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</TestableReference>
|
||||||
|
<TestableReference
|
||||||
|
skipped = "NO">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "F9384A611E3ACEFB001601E0"
|
||||||
|
BuildableName = "FSCalendarExampleUITests.xctest"
|
||||||
|
BlueprintName = "FSCalendarExampleUITests"
|
||||||
|
ReferencedContainer = "container:FSCalendar.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</TestableReference>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "EE0D7FC61B89C5D3003C287B"
|
||||||
|
BuildableName = "FSCalendarExample.app"
|
||||||
|
BlueprintName = "FSCalendarExample"
|
||||||
|
ReferencedContainer = "container:FSCalendar.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "EE0D7FC61B89C5D3003C287B"
|
||||||
|
BuildableName = "FSCalendarExample.app"
|
||||||
|
BlueprintName = "FSCalendarExample"
|
||||||
|
ReferencedContainer = "container:FSCalendar.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -43,14 +43,14 @@
|
||||||
[[application.tables elementBoundByIndex:0].cells[@"DIY Example, Feature!"] tap];
|
[[application.tables elementBoundByIndex:0].cells[@"DIY Example, Feature!"] tap];
|
||||||
XCUIElement *calendar = application.otherElements[@"calendar"];
|
XCUIElement *calendar = application.otherElements[@"calendar"];
|
||||||
|
|
||||||
XCUICoordinate *swipeStart = [calendar coordinateWithNormalizedOffset:CGVectorMake(0.5/7.0, 0.5)];
|
XCUICoordinate *swipeStart = [calendar coordinateWithNormalizedOffset:CGVectorMake(0.8/7.0, 0.5)];
|
||||||
XCUICoordinate *swipeEnd = [calendar coordinateWithNormalizedOffset:CGVectorMake(6.5/7.0, 0.5)];
|
XCUICoordinate *swipeEnd = [calendar coordinateWithNormalizedOffset:CGVectorMake(6.5/7.0, 0.5)];
|
||||||
[swipeStart pressForDuration:0.8 thenDragToCoordinate:swipeEnd];
|
[swipeStart pressForDuration:0.8 thenDragToCoordinate:swipeEnd];
|
||||||
|
|
||||||
[calendar swipeUp];
|
[calendar swipeUp];
|
||||||
[calendar swipeLeft];
|
[calendar swipeLeft];
|
||||||
|
|
||||||
swipeStart = [calendar coordinateWithNormalizedOffset:CGVectorMake(0.5/7.0, 0.75)];
|
swipeStart = [calendar coordinateWithNormalizedOffset:CGVectorMake(0.8/7.0, 0.75)];
|
||||||
swipeEnd = [calendar coordinateWithNormalizedOffset:CGVectorMake(6.5/7.0, 0.75)];
|
swipeEnd = [calendar coordinateWithNormalizedOffset:CGVectorMake(6.5/7.0, 0.75)];
|
||||||
[swipeStart pressForDuration:0.8 thenDragToCoordinate:swipeEnd];
|
[swipeStart pressForDuration:0.8 thenDragToCoordinate:swipeEnd];
|
||||||
[calendar swipeDown];
|
[calendar swipeDown];
|
||||||
|
|
@ -64,8 +64,8 @@
|
||||||
{
|
{
|
||||||
XCUIApplication *application = [[XCUIApplication alloc] init];
|
XCUIApplication *application = [[XCUIApplication alloc] init];
|
||||||
[[application.tables elementBoundByIndex:0].cells[@"Prev-Next Buttons"] tap];
|
[[application.tables elementBoundByIndex:0].cells[@"Prev-Next Buttons"] tap];
|
||||||
XCUIElement *prevButton = [application.buttons elementBoundByIndex:2];
|
XCUIElement *prevButton = [application.buttons elementBoundByIndex:1];
|
||||||
XCUIElement *nextButton = [application.buttons elementBoundByIndex:3];
|
XCUIElement *nextButton = [application.buttons elementBoundByIndex:2];
|
||||||
NSInteger count = 3;
|
NSInteger count = 3;
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
[prevButton tap];
|
[prevButton tap];
|
||||||
|
|
@ -199,7 +199,7 @@
|
||||||
CGVector vector1 = CGVectorMake(columnWidth * 3.5, cellStart + rowHeight * 2.5);
|
CGVector vector1 = CGVectorMake(columnWidth * 3.5, cellStart + rowHeight * 2.5);
|
||||||
CGVector vector2 = CGVectorMake(columnWidth * 4.5, cellStart + rowHeight * 2.5);
|
CGVector vector2 = CGVectorMake(columnWidth * 4.5, cellStart + rowHeight * 2.5);
|
||||||
|
|
||||||
XCUIElement *configureButton = [application.buttons elementBoundByIndex:2];
|
XCUIElement *configureButton = [application.buttons elementBoundByIndex:1];
|
||||||
|
|
||||||
[NSThread sleepForTimeInterval:0.5];
|
[NSThread sleepForTimeInterval:0.5];
|
||||||
[configureButton tap];
|
[configureButton tap];
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ NS_ASSUME_NONNULL_END
|
||||||
if ([[UIDevice currentDevice].model hasPrefix:@"iPad"]) {
|
if ([[UIDevice currentDevice].model hasPrefix:@"iPad"]) {
|
||||||
self.calendarHeightConstraint.constant = 400;
|
self.calendarHeightConstraint.constant = 400;
|
||||||
}
|
}
|
||||||
[self.calendar selectDate:[NSDate date] scrollToDate:YES];
|
|
||||||
|
|
||||||
UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self.calendar action:@selector(handleScopeGesture:)];
|
UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self.calendar action:@selector(handleScopeGesture:)];
|
||||||
panGesture.delegate = self;
|
panGesture.delegate = self;
|
||||||
|
|
@ -65,6 +64,8 @@ NS_ASSUME_NONNULL_END
|
||||||
self.calendar.placeholderType = FSCalendarPlaceholderTypeNone;
|
self.calendar.placeholderType = FSCalendarPlaceholderTypeNone;
|
||||||
self.calendar.scope = FSCalendarScopeWeek;
|
self.calendar.scope = FSCalendarScopeWeek;
|
||||||
|
|
||||||
|
[self.calendar selectDate:[NSDate date] scrollToDate:YES];
|
||||||
|
|
||||||
// For UITest
|
// For UITest
|
||||||
self.calendar.accessibilityIdentifier = @"calendar";
|
self.calendar.accessibilityIdentifier = @"calendar";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,20 +114,13 @@ NS_ASSUME_NONNULL_END
|
||||||
self.dateFormatter = [[NSDateFormatter alloc] init];
|
self.dateFormatter = [[NSDateFormatter alloc] init];
|
||||||
self.dateFormatter.dateFormat = @"yyyy-MM-dd";
|
self.dateFormatter.dateFormat = @"yyyy-MM-dd";
|
||||||
|
|
||||||
self.minimumDate = [self.dateFormatter dateFromString:@"2016-02-03"];
|
self.minimumDate = [self.dateFormatter dateFromString:@"2020-02-03"];
|
||||||
self.maximumDate = [self.dateFormatter dateFromString:@"2021-04-10"];
|
self.maximumDate = [self.dateFormatter dateFromString:@"2023-04-10"];
|
||||||
|
|
||||||
self.calendar.accessibilityIdentifier = @"calendar";
|
self.calendar.accessibilityIdentifier = @"calendar";
|
||||||
|
|
||||||
[self loadCalendarEvents];
|
[self loadCalendarEvents];
|
||||||
|
|
||||||
/*
|
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
||||||
self.minimumDate = [self.dateFormatter dateFromString:@"2015-02-01"];
|
|
||||||
self.maximumDate = [self.dateFormatter dateFromString:@"2015-06-10"];
|
|
||||||
[self.calendar reloadData];
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)didReceiveMemoryWarning
|
- (void)didReceiveMemoryWarning
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ NS_ASSUME_NONNULL_END
|
||||||
calendar.delegate = self;
|
calendar.delegate = self;
|
||||||
calendar.placeholderType = FSCalendarPlaceholderTypeNone;
|
calendar.placeholderType = FSCalendarPlaceholderTypeNone;
|
||||||
calendar.adjustsBoundingRectWhenChangingMonths = YES;
|
calendar.adjustsBoundingRectWhenChangingMonths = YES;
|
||||||
calendar.currentPage = [self.dateFormatter dateFromString:@"2016-06-01"];
|
calendar.currentPage = [self.dateFormatter dateFromString:@"2020-06-01"];
|
||||||
calendar.firstWeekday = 2;
|
calendar.firstWeekday = 2;
|
||||||
calendar.scrollDirection = FSCalendarScrollDirectionVertical;
|
calendar.scrollDirection = FSCalendarScrollDirectionVertical;
|
||||||
[self.view addSubview:calendar];
|
[self.view addSubview:calendar];
|
||||||
|
|
@ -126,12 +126,12 @@ NS_ASSUME_NONNULL_END
|
||||||
|
|
||||||
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
||||||
{
|
{
|
||||||
return [self.dateFormatter dateFromString:@"2016-01-08"];
|
return [self.dateFormatter dateFromString:@"2020-01-08"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
||||||
{
|
{
|
||||||
return [self.dateFormatter dateFromString:@"2018-10-08"];
|
return [self.dateFormatter dateFromString:@"2023-10-08"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc
|
- (void)dealloc
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,10 @@ NS_ASSUME_NONNULL_END
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (self) {
|
if (self) {
|
||||||
self.title = @"FSCalendar";
|
self.title = @"FSCalendar";
|
||||||
self.images = @{@"2016/11/01":[UIImage imageNamed:@"icon_cat"],
|
self.images = @{@"2020/11/01":[UIImage imageNamed:@"icon_cat"],
|
||||||
@"2016/11/05":[UIImage imageNamed:@"icon_footprint"],
|
@"2020/11/05":[UIImage imageNamed:@"icon_footprint"],
|
||||||
@"2016/11/20":[UIImage imageNamed:@"icon_cat"],
|
@"2020/11/20":[UIImage imageNamed:@"icon_cat"],
|
||||||
@"2016/11/07":[UIImage imageNamed:@"icon_footprint"]};
|
@"2020/11/07":[UIImage imageNamed:@"icon_footprint"]};
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
@ -65,7 +65,7 @@ NS_ASSUME_NONNULL_END
|
||||||
self.dateFormatter.dateFormat = @"yyyy/MM/dd";
|
self.dateFormatter.dateFormat = @"yyyy/MM/dd";
|
||||||
|
|
||||||
|
|
||||||
// [self.calendar selectDate:[self.dateFormatter dateFromString:@"2016/02/03"]];
|
// [self.calendar selectDate:[self.dateFormatter dateFromString:@"2020/02/03"]];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
|
@ -115,12 +115,12 @@ NS_ASSUME_NONNULL_END
|
||||||
|
|
||||||
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
||||||
{
|
{
|
||||||
return [self.dateFormatter dateFromString:@"2016/10/01"];
|
return [self.dateFormatter dateFromString:@"2020/10/01"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
||||||
{
|
{
|
||||||
return [self.dateFormatter dateFromString:@"2017/10/10"];
|
return [self.dateFormatter dateFromString:@"2023/10/10"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@
|
||||||
|
|
||||||
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
||||||
{
|
{
|
||||||
return [self.dateFormatter dateFromString:@"2016-07-08"];
|
return [self.dateFormatter dateFromString:@"2020-07-08"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
||||||
|
|
|
||||||
|
|
@ -54,18 +54,18 @@
|
||||||
|
|
||||||
self.calendar.appearance.caseOptions = FSCalendarCaseOptionsHeaderUsesUpperCase|FSCalendarCaseOptionsWeekdayUsesUpperCase;
|
self.calendar.appearance.caseOptions = FSCalendarCaseOptionsHeaderUsesUpperCase|FSCalendarCaseOptionsWeekdayUsesUpperCase;
|
||||||
|
|
||||||
self.datesShouldNotBeSelected = @[@"2016/08/07",
|
self.datesShouldNotBeSelected = @[@"2020/08/07",
|
||||||
@"2016/09/07",
|
@"2020/09/07",
|
||||||
@"2016/10/07",
|
@"2020/10/07",
|
||||||
@"2016/11/07",
|
@"2020/11/07",
|
||||||
@"2016/12/07",
|
@"2020/12/07",
|
||||||
@"2016/01/07",
|
@"2020/01/07",
|
||||||
@"2016/02/07"];
|
@"2020/02/07"];
|
||||||
|
|
||||||
self.datesWithEvent = @[@"2016-12-03",
|
self.datesWithEvent = @[@"2020-12-03",
|
||||||
@"2016-12-07",
|
@"2020-12-07",
|
||||||
@"2016-12-15",
|
@"2020-12-15",
|
||||||
@"2016-12-25"];
|
@"2020-12-25"];
|
||||||
|
|
||||||
self.lunarFormatter = [[LunarFormatter alloc] init];
|
self.lunarFormatter = [[LunarFormatter alloc] init];
|
||||||
}
|
}
|
||||||
|
|
@ -81,7 +81,8 @@
|
||||||
if ([[UIDevice currentDevice].model hasPrefix:@"iPad"]) {
|
if ([[UIDevice currentDevice].model hasPrefix:@"iPad"]) {
|
||||||
self.calendarHeightConstraint.constant = 400;
|
self.calendarHeightConstraint.constant = 400;
|
||||||
}
|
}
|
||||||
[self.calendar selectDate:[self.dateFormatter1 dateFromString:@"2016/12/05"] scrollToDate:YES];
|
self.calendar.today = [self.dateFormatter1 dateFromString:@"2020/11/19"];
|
||||||
|
// [self.calendar selectDate:[self.dateFormatter1 dateFromString:@"2020/11/09"] scrollToDate:YES];
|
||||||
|
|
||||||
self.calendar.accessibilityIdentifier = @"calendar";
|
self.calendar.accessibilityIdentifier = @"calendar";
|
||||||
|
|
||||||
|
|
@ -117,12 +118,12 @@
|
||||||
|
|
||||||
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
||||||
{
|
{
|
||||||
return [self.dateFormatter1 dateFromString:@"2016/10/01"];
|
return [self.dateFormatter1 dateFromString:@"2020/10/01"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
||||||
{
|
{
|
||||||
return [self.dateFormatter1 dateFromString:@"2018/05/31"];
|
return [self.dateFormatter1 dateFromString:@"2023/05/31"];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - FSCalendarDelegate
|
#pragma mark - FSCalendarDelegate
|
||||||
|
|
|
||||||
|
|
@ -57,12 +57,12 @@
|
||||||
305282C81E1608A100CC2877 /* FSCalendarScopeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSCalendarScopeViewController.swift; sourceTree = "<group>"; };
|
305282C81E1608A100CC2877 /* FSCalendarScopeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSCalendarScopeViewController.swift; sourceTree = "<group>"; };
|
||||||
30D458E81DB4E2DB00B163C7 /* LoadViewExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoadViewExampleViewController.swift; sourceTree = "<group>"; };
|
30D458E81DB4E2DB00B163C7 /* LoadViewExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoadViewExampleViewController.swift; sourceTree = "<group>"; };
|
||||||
30F4C9191E07C3AD00D2EC4D /* FSCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendar.h; sourceTree = "<group>"; };
|
30F4C9191E07C3AD00D2EC4D /* FSCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendar.h; sourceTree = "<group>"; };
|
||||||
30F4C91A1E07C3AD00D2EC4D /* FSCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendar.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
|
30F4C91A1E07C3AD00D2EC4D /* FSCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendar.m; sourceTree = "<group>"; };
|
||||||
30F4C91D1E07C3AD00D2EC4D /* FSCalendarAppearance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarAppearance.h; sourceTree = "<group>"; };
|
30F4C91D1E07C3AD00D2EC4D /* FSCalendarAppearance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarAppearance.h; sourceTree = "<group>"; };
|
||||||
30F4C91E1E07C3AD00D2EC4D /* FSCalendarAppearance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarAppearance.m; sourceTree = "<group>"; };
|
30F4C91E1E07C3AD00D2EC4D /* FSCalendarAppearance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarAppearance.m; sourceTree = "<group>"; };
|
||||||
30F4C91F1E07C3AD00D2EC4D /* FSCalendarCalculator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarCalculator.h; sourceTree = "<group>"; };
|
30F4C91F1E07C3AD00D2EC4D /* FSCalendarCalculator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarCalculator.h; sourceTree = "<group>"; };
|
||||||
30F4C9201E07C3AD00D2EC4D /* FSCalendarCalculator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarCalculator.m; sourceTree = "<group>"; };
|
30F4C9201E07C3AD00D2EC4D /* FSCalendarCalculator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarCalculator.m; sourceTree = "<group>"; };
|
||||||
30F4C9211E07C3AD00D2EC4D /* FSCalendarCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarCell.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
30F4C9211E07C3AD00D2EC4D /* FSCalendarCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarCell.h; sourceTree = "<group>"; };
|
||||||
30F4C9221E07C3AD00D2EC4D /* FSCalendarCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarCell.m; sourceTree = "<group>"; };
|
30F4C9221E07C3AD00D2EC4D /* FSCalendarCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarCell.m; sourceTree = "<group>"; };
|
||||||
30F4C9231E07C3AD00D2EC4D /* FSCalendarCollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarCollectionView.h; sourceTree = "<group>"; };
|
30F4C9231E07C3AD00D2EC4D /* FSCalendarCollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarCollectionView.h; sourceTree = "<group>"; };
|
||||||
30F4C9241E07C3AD00D2EC4D /* FSCalendarCollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarCollectionView.m; sourceTree = "<group>"; };
|
30F4C9241E07C3AD00D2EC4D /* FSCalendarCollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarCollectionView.m; sourceTree = "<group>"; };
|
||||||
|
|
@ -288,6 +288,7 @@
|
||||||
developmentRegion = English;
|
developmentRegion = English;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
|
English,
|
||||||
en,
|
en,
|
||||||
Base,
|
Base,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
|
|
||||||
s.name = "FSCalendar"
|
s.name = "FSCalendar"
|
||||||
s.version = "2.8.0"
|
s.version = "2.8.4"
|
||||||
s.summary = "A superiorly awesome iOS7+ calendar control, compatible with Objective-C and Swift."
|
s.summary = "A superiorly awesome iOS7+ calendar control, compatible with Objective-C and Swift."
|
||||||
|
|
||||||
s.homepage = "https://github.com/WenchaoD/FSCalendar"
|
s.homepage = "https://github.com/WenchaoD/FSCalendar"
|
||||||
s.screenshots = "https://cloud.githubusercontent.com/assets/5186464/10262249/4fabae40-69f2-11e5-97ab-afbacd0a3da2.jpg"
|
s.screenshots = "https://cloud.githubusercontent.com/assets/5186464/10262249/4fabae40-69f2-11e5-97ab-afbacd0a3da2.jpg"
|
||||||
s.license = 'MIT'
|
s.license = 'MIT'
|
||||||
s.author = { "Wenchao Ding" => "f33chobits@gmail.com" }
|
s.author = { "Wenchao Ding" => "f33chobits@gmail.com" }
|
||||||
s.source = { :git => "https://github.com/WenchaoD/FSCalendar.git", :tag => s.version.to_s }
|
s.source = { :git => "https://github.com/TouchInstinct/FSCalendar.git", :tag => s.version.to_s }
|
||||||
|
|
||||||
s.platform = :ios
|
s.platform = :ios
|
||||||
s.ios.deployment_target = '8.0'
|
s.ios.deployment_target = '8.0'
|
||||||
|
|
|
||||||
|
|
@ -407,6 +407,11 @@ IB_DESIGNABLE
|
||||||
*/
|
*/
|
||||||
- (void)reloadData;
|
- (void)reloadData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Reload data of the calendar cell.
|
||||||
|
*/
|
||||||
|
- (void)reloadDataForCell:(FSCalendarCell *)cell atIndexPath:(NSIndexPath *)indexPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Change the scope of the calendar. Make sure `-calendar:boundingRectWillChange:animated` is correctly adopted.
|
Change the scope of the calendar. Make sure `-calendar:boundingRectWillChange:animated` is correctly adopted.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,8 +110,6 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
||||||
- (void)selectCounterpartDate:(NSDate *)date;
|
- (void)selectCounterpartDate:(NSDate *)date;
|
||||||
- (void)deselectCounterpartDate:(NSDate *)date;
|
- (void)deselectCounterpartDate:(NSDate *)date;
|
||||||
|
|
||||||
- (void)reloadDataForCell:(FSCalendarCell *)cell atIndexPath:(NSIndexPath *)indexPath;
|
|
||||||
|
|
||||||
- (void)adjustMonthPosition;
|
- (void)adjustMonthPosition;
|
||||||
- (BOOL)requestBoundingDatesIfNecessary;
|
- (BOOL)requestBoundingDatesIfNecessary;
|
||||||
- (void)executePendingOperationsIfNeeded;
|
- (void)executePendingOperationsIfNeeded;
|
||||||
|
|
@ -153,11 +151,11 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
||||||
_formatter = [[NSDateFormatter alloc] init];
|
_formatter = [[NSDateFormatter alloc] init];
|
||||||
_formatter.dateFormat = @"yyyy-MM-dd";
|
_formatter.dateFormat = @"yyyy-MM-dd";
|
||||||
_locale = [NSLocale currentLocale];
|
_locale = [NSLocale currentLocale];
|
||||||
_timeZone = [NSTimeZone localTimeZone];
|
_timeZone = [NSTimeZone defaultTimeZone];
|
||||||
_firstWeekday = 1;
|
_firstWeekday = 1;
|
||||||
[self invalidateDateTools];
|
[self invalidateDateTools];
|
||||||
|
|
||||||
_today = [self.gregorian dateBySettingHour:0 minute:0 second:0 ofDate:[NSDate date] options:0];
|
_today = [self.gregorian startOfDayForDate:[NSDate date]];
|
||||||
_currentPage = [self.gregorian fs_firstDayOfMonth:_today];
|
_currentPage = [self.gregorian fs_firstDayOfMonth:_today];
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -701,7 +699,7 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
||||||
_today = nil;
|
_today = nil;
|
||||||
} else {
|
} else {
|
||||||
FSCalendarAssertDateInBounds(today,self.gregorian,self.minimumDate,self.maximumDate);
|
FSCalendarAssertDateInBounds(today,self.gregorian,self.minimumDate,self.maximumDate);
|
||||||
_today = [self.gregorian dateBySettingHour:0 minute:0 second:0 ofDate:today options:0];
|
_today = [self.gregorian startOfDayForDate:today];
|
||||||
}
|
}
|
||||||
if (self.hasValidateVisibleLayout) {
|
if (self.hasValidateVisibleLayout) {
|
||||||
[self.visibleCells makeObjectsPerformSelector:@selector(setDateIsToday:) withObject:nil];
|
[self.visibleCells makeObjectsPerformSelector:@selector(setDateIsToday:) withObject:nil];
|
||||||
|
|
@ -719,7 +717,7 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
||||||
{
|
{
|
||||||
[self requestBoundingDatesIfNecessary];
|
[self requestBoundingDatesIfNecessary];
|
||||||
if (self.floatingMode || [self isDateInDifferentPage:currentPage]) {
|
if (self.floatingMode || [self isDateInDifferentPage:currentPage]) {
|
||||||
currentPage = [self.gregorian dateBySettingHour:0 minute:0 second:0 ofDate:currentPage options:0];
|
currentPage = [self.gregorian startOfDayForDate:currentPage];
|
||||||
if ([self isPageInRange:currentPage]) {
|
if ([self isPageInRange:currentPage]) {
|
||||||
[self scrollToPageForDate:currentPage animated:animated];
|
[self scrollToPageForDate:currentPage animated:animated];
|
||||||
}
|
}
|
||||||
|
|
@ -1037,7 +1035,7 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
||||||
|
|
||||||
- (void)deselectDate:(NSDate *)date
|
- (void)deselectDate:(NSDate *)date
|
||||||
{
|
{
|
||||||
date = [self.gregorian dateBySettingHour:0 minute:0 second:0 ofDate:date options:0];
|
date = [self.gregorian startOfDayForDate:date];
|
||||||
if (![_selectedDates containsObject:date]) {
|
if (![_selectedDates containsObject:date]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1060,7 +1058,7 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
||||||
|
|
||||||
FSCalendarAssertDateInBounds(date,self.gregorian,self.minimumDate,self.maximumDate);
|
FSCalendarAssertDateInBounds(date,self.gregorian,self.minimumDate,self.maximumDate);
|
||||||
|
|
||||||
NSDate *targetDate = [self.gregorian dateBySettingHour:0 minute:0 second:0 ofDate:date options:0];
|
NSDate *targetDate = [self.gregorian startOfDayForDate:date];
|
||||||
NSIndexPath *targetIndexPath = [self.calculator indexPathForDate:targetDate];
|
NSIndexPath *targetIndexPath = [self.calculator indexPathForDate:targetDate];
|
||||||
|
|
||||||
BOOL shouldSelect = YES;
|
BOOL shouldSelect = YES;
|
||||||
|
|
@ -1534,9 +1532,9 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
||||||
_needsRequestingBoundingDates = NO;
|
_needsRequestingBoundingDates = NO;
|
||||||
self.formatter.dateFormat = @"yyyy-MM-dd";
|
self.formatter.dateFormat = @"yyyy-MM-dd";
|
||||||
NSDate *newMin = [self.dataSourceProxy minimumDateForCalendar:self]?:[self.formatter dateFromString:@"1970-01-01"];
|
NSDate *newMin = [self.dataSourceProxy minimumDateForCalendar:self]?:[self.formatter dateFromString:@"1970-01-01"];
|
||||||
newMin = [self.gregorian dateBySettingHour:0 minute:0 second:0 ofDate:newMin options:0];
|
newMin = [self.gregorian startOfDayForDate:newMin];
|
||||||
NSDate *newMax = [self.dataSourceProxy maximumDateForCalendar:self]?:[self.formatter dateFromString:@"2099-12-31"];
|
NSDate *newMax = [self.dataSourceProxy maximumDateForCalendar:self]?:[self.formatter dateFromString:@"2099-12-31"];
|
||||||
newMax = [self.gregorian dateBySettingHour:0 minute:0 second:0 ofDate:newMax options:0];
|
newMax = [self.gregorian startOfDayForDate:newMax];
|
||||||
|
|
||||||
NSAssert([self.gregorian compareDate:newMin toDate:newMax toUnitGranularity:NSCalendarUnitDay] != NSOrderedDescending, @"The minimum date of calendar should be earlier than the maximum.");
|
NSAssert([self.gregorian compareDate:newMin toDate:newMax toUnitGranularity:NSCalendarUnitDay] != NSOrderedDescending, @"The minimum date of calendar should be earlier than the maximum.");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@ typedef NS_ENUM(NSUInteger, FSCalendarSeparators) {
|
||||||
|
|
||||||
typedef NS_OPTIONS(NSUInteger, FSCalendarCaseOptions) {
|
typedef NS_OPTIONS(NSUInteger, FSCalendarCaseOptions) {
|
||||||
FSCalendarCaseOptionsHeaderUsesDefaultCase = 0,
|
FSCalendarCaseOptionsHeaderUsesDefaultCase = 0,
|
||||||
FSCalendarCaseOptionsHeaderUsesUpperCase = 1,
|
FSCalendarCaseOptionsHeaderUsesUpperCase = 1 << 0,
|
||||||
|
FSCalendarCaseOptionsHeaderUsesCapitalized = 1 << 1,
|
||||||
|
|
||||||
FSCalendarCaseOptionsWeekdayUsesDefaultCase = 0 << 4,
|
FSCalendarCaseOptionsWeekdayUsesDefaultCase = 0 << 4,
|
||||||
FSCalendarCaseOptionsWeekdayUsesUpperCase = 1 << 4,
|
FSCalendarCaseOptionsWeekdayUsesUpperCase = 1 << 4,
|
||||||
|
|
@ -63,6 +64,11 @@ typedef NS_OPTIONS(NSUInteger, FSCalendarCaseOptions) {
|
||||||
*/
|
*/
|
||||||
@property (strong, nonatomic) UIFont *headerTitleFont;
|
@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.
|
* The offset of the day text from default position.
|
||||||
*/
|
*/
|
||||||
|
|
@ -103,11 +109,21 @@ typedef NS_OPTIONS(NSUInteger, FSCalendarCaseOptions) {
|
||||||
*/
|
*/
|
||||||
@property (strong, nonatomic) UIColor *headerTitleColor;
|
@property (strong, nonatomic) UIColor *headerTitleColor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The color oh month header separator
|
||||||
|
*/
|
||||||
|
@property (strong, nonatomic) UIColor *headerSeparatorColor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The date format of the month header.
|
* The date format of the month header.
|
||||||
*/
|
*/
|
||||||
@property (strong, nonatomic) NSString *headerDateFormat;
|
@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.
|
* The alpha value of month label staying on the fringes.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,11 @@
|
||||||
_headerTitleFont = [UIFont systemFontOfSize:FSCalendarStandardHeaderTextSize];
|
_headerTitleFont = [UIFont systemFontOfSize:FSCalendarStandardHeaderTextSize];
|
||||||
|
|
||||||
_headerTitleColor = FSCalendarStandardTitleTextColor;
|
_headerTitleColor = FSCalendarStandardTitleTextColor;
|
||||||
|
_headerSeparatorColor = FSCalendarStandardLineColor;
|
||||||
_headerDateFormat = @"MMMM yyyy";
|
_headerDateFormat = @"MMMM yyyy";
|
||||||
_headerMinimumDissolvedAlpha = 0.2;
|
_headerMinimumDissolvedAlpha = 0.2;
|
||||||
|
_headerTitleOffset = CGPointZero;
|
||||||
|
_headerTitleAlignment = NSTextAlignmentCenter;
|
||||||
_weekdayTextColor = FSCalendarStandardTitleTextColor;
|
_weekdayTextColor = FSCalendarStandardTitleTextColor;
|
||||||
_caseOptions = FSCalendarCaseOptionsHeaderUsesDefaultCase|FSCalendarCaseOptionsWeekdayUsesDefaultCase;
|
_caseOptions = FSCalendarCaseOptionsHeaderUsesDefaultCase|FSCalendarCaseOptionsWeekdayUsesDefaultCase;
|
||||||
|
|
||||||
|
|
@ -111,6 +114,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)setHeaderTitleOffset:(CGPoint)headerTitleOffset {
|
||||||
|
if (!CGPointEqualToPoint(_headerTitleOffset, headerTitleOffset)) {
|
||||||
|
_headerTitleOffset = headerTitleOffset;
|
||||||
|
[self.calendar configureAppearance];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)setTitleOffset:(CGPoint)titleOffset
|
- (void)setTitleOffset:(CGPoint)titleOffset
|
||||||
{
|
{
|
||||||
if (!CGPointEqualToPoint(_titleOffset, titleOffset)) {
|
if (!CGPointEqualToPoint(_titleOffset, titleOffset)) {
|
||||||
|
|
@ -402,6 +412,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)setHeaderSeparatorColor:(UIColor *)headerSeparatorColor
|
||||||
|
{
|
||||||
|
if (![_headerSeparatorColor isEqual:headerSeparatorColor]) {
|
||||||
|
_headerSeparatorColor = headerSeparatorColor;
|
||||||
|
[self.calendar configureAppearance];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)setHeaderMinimumDissolvedAlpha:(CGFloat)headerMinimumDissolvedAlpha
|
- (void)setHeaderMinimumDissolvedAlpha:(CGFloat)headerMinimumDissolvedAlpha
|
||||||
{
|
{
|
||||||
if (_headerMinimumDissolvedAlpha != headerMinimumDissolvedAlpha) {
|
if (_headerMinimumDissolvedAlpha != headerMinimumDissolvedAlpha) {
|
||||||
|
|
@ -418,6 +436,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)setHeaderTitleAlignment:(NSTextAlignment)headerTitleAlignment
|
||||||
|
{
|
||||||
|
if (_headerTitleAlignment != headerTitleAlignment) {
|
||||||
|
_headerTitleAlignment = headerTitleAlignment;
|
||||||
|
[self.calendar configureAppearance];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)setCaseOptions:(FSCalendarCaseOptions)caseOptions
|
- (void)setCaseOptions:(FSCalendarCaseOptions)caseOptions
|
||||||
{
|
{
|
||||||
if (_caseOptions != caseOptions) {
|
if (_caseOptions != caseOptions) {
|
||||||
|
|
@ -482,22 +508,22 @@
|
||||||
|
|
||||||
- (void)setTitleTextSize:(CGFloat)titleTextSize
|
- (void)setTitleTextSize:(CGFloat)titleTextSize
|
||||||
{
|
{
|
||||||
self.titleFont = [UIFont fontWithName:self.titleFont.fontName size:titleTextSize];
|
self.titleFont = [self.titleFont fontWithSize:titleTextSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setSubtitleTextSize:(CGFloat)subtitleTextSize
|
- (void)setSubtitleTextSize:(CGFloat)subtitleTextSize
|
||||||
{
|
{
|
||||||
self.subtitleFont = [UIFont fontWithName:self.subtitleFont.fontName size:subtitleTextSize];
|
self.subtitleFont = [self.subtitleFont fontWithSize:subtitleTextSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setWeekdayTextSize:(CGFloat)weekdayTextSize
|
- (void)setWeekdayTextSize:(CGFloat)weekdayTextSize
|
||||||
{
|
{
|
||||||
self.weekdayFont = [UIFont fontWithName:self.weekdayFont.fontName size:weekdayTextSize];
|
self.weekdayFont = [self.weekdayFont fontWithSize:weekdayTextSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setHeaderTitleTextSize:(CGFloat)headerTitleTextSize
|
- (void)setHeaderTitleTextSize:(CGFloat)headerTitleTextSize
|
||||||
{
|
{
|
||||||
self.headerTitleFont = [UIFont fontWithName:self.headerTitleFont.fontName size:headerTitleTextSize];
|
self.headerTitleFont = [self.headerTitleFont fontWithSize:headerTitleTextSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)invalidateAppearance
|
- (void)invalidateAppearance
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@
|
||||||
if (self.calendar.placeholderType == FSCalendarPlaceholderTypeFillSixRows) return 6;
|
if (self.calendar.placeholderType == FSCalendarPlaceholderTypeFillSixRows) return 6;
|
||||||
|
|
||||||
NSNumber *rowCount = self.rowCounts[month];
|
NSNumber *rowCount = self.rowCounts[month];
|
||||||
if (!rowCount) {
|
if (rowCount == nil) {
|
||||||
NSDate *firstDayOfMonth = [self.gregorian fs_firstDayOfMonth:month];
|
NSDate *firstDayOfMonth = [self.gregorian fs_firstDayOfMonth:month];
|
||||||
NSInteger weekdayOfFirstDay = [self.gregorian component:NSCalendarUnitWeekday fromDate:firstDayOfMonth];
|
NSInteger weekdayOfFirstDay = [self.gregorian component:NSCalendarUnitWeekday fromDate:firstDayOfMonth];
|
||||||
NSInteger numberOfDaysInMonth = [self.gregorian fs_numberOfDaysInMonth:month];
|
NSInteger numberOfDaysInMonth = [self.gregorian fs_numberOfDaysInMonth:month];
|
||||||
|
|
|
||||||
|
|
@ -387,7 +387,7 @@ OFFSET_PROPERTY(preferredEventOffset, PreferredEventOffset, _appearance.eventOff
|
||||||
self.contentView = view;
|
self.contentView = view;
|
||||||
|
|
||||||
self.eventLayers = [NSPointerArray weakObjectsPointerArray];
|
self.eventLayers = [NSPointerArray weakObjectsPointerArray];
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < FSCalendarMaximumNumberOfEvents; i++) {
|
||||||
CALayer *layer = [CALayer layer];
|
CALayer *layer = [CALayer layer];
|
||||||
layer.backgroundColor = [UIColor clearColor].CGColor;
|
layer.backgroundColor = [UIColor clearColor].CGColor;
|
||||||
[self.contentView.layer addSublayer:layer];
|
[self.contentView.layer addSublayer:layer];
|
||||||
|
|
@ -450,7 +450,7 @@ OFFSET_PROPERTY(preferredEventOffset, PreferredEventOffset, _appearance.eventOff
|
||||||
- (void)setNumberOfEvents:(NSInteger)numberOfEvents
|
- (void)setNumberOfEvents:(NSInteger)numberOfEvents
|
||||||
{
|
{
|
||||||
if (_numberOfEvents != numberOfEvents) {
|
if (_numberOfEvents != numberOfEvents) {
|
||||||
_numberOfEvents = MIN(MAX(numberOfEvents,0),3);
|
_numberOfEvents = MIN(MAX(numberOfEvents,0),FSCalendarMaximumNumberOfEvents);
|
||||||
[self setNeedsLayout];
|
[self setNeedsLayout];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ CG_EXTERN CGFloat const FSCalendarStandardHeaderTextSize;
|
||||||
CG_EXTERN CGFloat const FSCalendarMaximumEventDotDiameter;
|
CG_EXTERN CGFloat const FSCalendarMaximumEventDotDiameter;
|
||||||
|
|
||||||
UIKIT_EXTERN NSInteger const FSCalendarDefaultHourComponent;
|
UIKIT_EXTERN NSInteger const FSCalendarDefaultHourComponent;
|
||||||
|
UIKIT_EXTERN NSInteger const FSCalendarMaximumNumberOfEvents;
|
||||||
|
|
||||||
UIKIT_EXTERN NSString * const FSCalendarDefaultCellReuseIdentifier;
|
UIKIT_EXTERN NSString * const FSCalendarDefaultCellReuseIdentifier;
|
||||||
UIKIT_EXTERN NSString * const FSCalendarBlankCellReuseIdentifier;
|
UIKIT_EXTERN NSString * const FSCalendarBlankCellReuseIdentifier;
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ CGFloat const FSCalendarStandardHeaderTextSize = 16.5;
|
||||||
CGFloat const FSCalendarMaximumEventDotDiameter = 4.8;
|
CGFloat const FSCalendarMaximumEventDotDiameter = 4.8;
|
||||||
|
|
||||||
NSInteger const FSCalendarDefaultHourComponent = 0;
|
NSInteger const FSCalendarDefaultHourComponent = 0;
|
||||||
|
NSInteger const FSCalendarMaximumNumberOfEvents = 3;
|
||||||
|
|
||||||
NSString * const FSCalendarDefaultCellReuseIdentifier = @"_FSCalendarDefaultCellReuseIdentifier";
|
NSString * const FSCalendarDefaultCellReuseIdentifier = @"_FSCalendarDefaultCellReuseIdentifier";
|
||||||
NSString * const FSCalendarBlankCellReuseIdentifier = @"_FSCalendarBlankCellReuseIdentifier";
|
NSString * const FSCalendarBlankCellReuseIdentifier = @"_FSCalendarBlankCellReuseIdentifier";
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@
|
||||||
@property (readonly, nonatomic) NSArray *visibleStickyHeaders;
|
@property (readonly, nonatomic) NSArray *visibleStickyHeaders;
|
||||||
@property (readonly, nonatomic) CGFloat preferredHeaderHeight;
|
@property (readonly, nonatomic) CGFloat preferredHeaderHeight;
|
||||||
@property (readonly, nonatomic) CGFloat preferredWeekdayHeight;
|
@property (readonly, nonatomic) CGFloat preferredWeekdayHeight;
|
||||||
@property (readonly, nonatomic) UIView *bottomBorder;
|
|
||||||
|
|
||||||
@property (readonly, nonatomic) NSCalendar *gregorian;
|
@property (readonly, nonatomic) NSCalendar *gregorian;
|
||||||
@property (readonly, nonatomic) NSDateFormatter *formatter;
|
@property (readonly, nonatomic) NSDateFormatter *formatter;
|
||||||
|
|
@ -41,13 +40,9 @@
|
||||||
|
|
||||||
@property (assign, nonatomic) BOOL needsAdjustingViewFrame;
|
@property (assign, nonatomic) BOOL needsAdjustingViewFrame;
|
||||||
|
|
||||||
- (void)invalidateHeaders;
|
|
||||||
- (void)adjustMonthPosition;
|
- (void)adjustMonthPosition;
|
||||||
- (void)configureAppearance;
|
- (void)configureAppearance;
|
||||||
|
|
||||||
- (BOOL)isPageInRange:(NSDate *)page;
|
|
||||||
- (BOOL)isDateInRange:(NSDate *)date;
|
|
||||||
|
|
||||||
- (CGSize)sizeThatFits:(CGSize)size scope:(FSCalendarScope)scope;
|
- (CGSize)sizeThatFits:(CGSize)size scope:(FSCalendarScope)scope;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@
|
||||||
components.day = - (weekdayComponents.weekday - self.firstWeekday);
|
components.day = - (weekdayComponents.weekday - self.firstWeekday);
|
||||||
components.day = (components.day-7) % 7;
|
components.day = (components.day-7) % 7;
|
||||||
NSDate *firstDayOfWeek = [self dateByAddingComponents:components toDate:week options:0];
|
NSDate *firstDayOfWeek = [self dateByAddingComponents:components toDate:week options:0];
|
||||||
firstDayOfWeek = [self dateBySettingHour:0 minute:0 second:0 ofDate:firstDayOfWeek options:0];
|
firstDayOfWeek = [self startOfDayForDate:firstDayOfWeek];
|
||||||
components.day = NSIntegerMax;
|
components.day = NSIntegerMax;
|
||||||
return firstDayOfWeek;
|
return firstDayOfWeek;
|
||||||
}
|
}
|
||||||
|
|
@ -184,7 +184,7 @@
|
||||||
components.day = - (weekdayComponents.weekday - self.firstWeekday);
|
components.day = - (weekdayComponents.weekday - self.firstWeekday);
|
||||||
components.day = (components.day-7) % 7 + 6;
|
components.day = (components.day-7) % 7 + 6;
|
||||||
NSDate *lastDayOfWeek = [self dateByAddingComponents:components toDate:week options:0];
|
NSDate *lastDayOfWeek = [self dateByAddingComponents:components toDate:week options:0];
|
||||||
lastDayOfWeek = [self dateBySettingHour:0 minute:0 second:0 ofDate:lastDayOfWeek options:0];
|
lastDayOfWeek = [self startOfDayForDate:lastDayOfWeek];
|
||||||
components.day = NSIntegerMax;
|
components.day = NSIntegerMax;
|
||||||
return lastDayOfWeek;
|
return lastDayOfWeek;
|
||||||
}
|
}
|
||||||
|
|
@ -195,6 +195,11 @@
|
||||||
NSDateComponents *weekdayComponents = [self components:NSCalendarUnitWeekday fromDate:week];
|
NSDateComponents *weekdayComponents = [self components:NSCalendarUnitWeekday fromDate:week];
|
||||||
NSDateComponents *componentsToSubtract = self.fs_privateComponents;
|
NSDateComponents *componentsToSubtract = self.fs_privateComponents;
|
||||||
componentsToSubtract.day = - (weekdayComponents.weekday - self.firstWeekday) + 3;
|
componentsToSubtract.day = - (weekdayComponents.weekday - self.firstWeekday) + 3;
|
||||||
|
// Fix https://github.com/WenchaoD/FSCalendar/issues/1100 and https://github.com/WenchaoD/FSCalendar/issues/1102
|
||||||
|
// If firstWeekday is not 1, and weekday is less than firstWeekday, the middleDayOfWeek will be the middle day of next week
|
||||||
|
if (weekdayComponents.weekday < self.firstWeekday) {
|
||||||
|
componentsToSubtract.day = componentsToSubtract.day - 7;
|
||||||
|
}
|
||||||
NSDate *middleDayOfWeek = [self dateByAddingComponents:componentsToSubtract toDate:week options:0];
|
NSDate *middleDayOfWeek = [self dateByAddingComponents:componentsToSubtract toDate:week options:0];
|
||||||
NSDateComponents *components = [self components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour fromDate:middleDayOfWeek];
|
NSDateComponents *components = [self components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour fromDate:middleDayOfWeek];
|
||||||
middleDayOfWeek = [self dateFromComponents:components];
|
middleDayOfWeek = [self dateFromComponents:components];
|
||||||
|
|
|
||||||
|
|
@ -156,8 +156,8 @@
|
||||||
FSCalendarAppearance *appearance = self.calendar.appearance;
|
FSCalendarAppearance *appearance = self.calendar.appearance;
|
||||||
cell.titleLabel.font = appearance.headerTitleFont;
|
cell.titleLabel.font = appearance.headerTitleFont;
|
||||||
cell.titleLabel.textColor = appearance.headerTitleColor;
|
cell.titleLabel.textColor = appearance.headerTitleColor;
|
||||||
|
cell.titleLabel.textAlignment = appearance.headerTitleAlignment;
|
||||||
_calendar.formatter.dateFormat = appearance.headerDateFormat;
|
_calendar.formatter.dateFormat = appearance.headerDateFormat;
|
||||||
BOOL usesUpperCase = (appearance.caseOptions & 15) == FSCalendarCaseOptionsHeaderUsesUpperCase;
|
|
||||||
NSString *text = nil;
|
NSString *text = nil;
|
||||||
switch (self.calendar.transitionCoordinator.representingScope) {
|
switch (self.calendar.transitionCoordinator.representingScope) {
|
||||||
case FSCalendarScopeMonth: {
|
case FSCalendarScopeMonth: {
|
||||||
|
|
@ -189,7 +189,13 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text = usesUpperCase ? text.uppercaseString : text;
|
BOOL usesUpperCase = (appearance.caseOptions & 15) == FSCalendarCaseOptionsHeaderUsesUpperCase;
|
||||||
|
BOOL usesCapitalized = (appearance.caseOptions & 15) == FSCalendarCaseOptionsHeaderUsesCapitalized;
|
||||||
|
if (usesUpperCase) {
|
||||||
|
text = text.uppercaseString;
|
||||||
|
} else if (usesCapitalized) {
|
||||||
|
text = text.capitalizedString;
|
||||||
|
}
|
||||||
cell.titleLabel.text = text;
|
cell.titleLabel.text = text;
|
||||||
[cell setNeedsLayout];
|
[cell setNeedsLayout];
|
||||||
}
|
}
|
||||||
|
|
@ -211,7 +217,6 @@
|
||||||
self = [super initWithFrame:frame];
|
self = [super initWithFrame:frame];
|
||||||
if (self) {
|
if (self) {
|
||||||
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
|
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
|
||||||
titleLabel.textAlignment = NSTextAlignmentCenter;
|
|
||||||
titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
|
titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
|
||||||
titleLabel.numberOfLines = 0;
|
titleLabel.numberOfLines = 0;
|
||||||
[self.contentView addSubview:titleLabel];
|
[self.contentView addSubview:titleLabel];
|
||||||
|
|
@ -229,8 +234,11 @@
|
||||||
- (void)layoutSubviews
|
- (void)layoutSubviews
|
||||||
{
|
{
|
||||||
[super layoutSubviews];
|
[super layoutSubviews];
|
||||||
|
|
||||||
self.titleLabel.frame = self.contentView.bounds;
|
CGPoint titleHeaderOffset = self.header.calendar.appearance.headerTitleOffset;
|
||||||
|
self.titleLabel.frame = CGRectOffset(self.contentView.bounds,
|
||||||
|
titleHeaderOffset.x,
|
||||||
|
titleHeaderOffset.y);
|
||||||
|
|
||||||
if (self.header.scrollDirection == UICollectionViewScrollDirectionHorizontal) {
|
if (self.header.scrollDirection == UICollectionViewScrollDirectionHorizontal) {
|
||||||
CGFloat position = [self.contentView convertPoint:CGPointMake(CGRectGetMidX(self.contentView.bounds), CGRectGetMidY(self.contentView.bounds)) toView:self.header].x;
|
CGFloat position = [self.contentView convertPoint:CGPointMake(CGRectGetMidX(self.contentView.bounds), CGRectGetMidY(self.contentView.bounds)) toView:self.header].x;
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,12 @@
|
||||||
CGFloat titleHeight = [@"1" sizeWithAttributes:@{NSFontAttributeName:self.calendar.appearance.headerTitleFont}].height*1.5 + weekdayMargin*3;
|
CGFloat titleHeight = [@"1" sizeWithAttributes:@{NSFontAttributeName:self.calendar.appearance.headerTitleFont}].height*1.5 + weekdayMargin*3;
|
||||||
|
|
||||||
_bottomBorder.frame = CGRectMake(0, _contentView.fs_height-weekdayHeight-weekdayMargin*2, _contentView.fs_width, 1.0);
|
_bottomBorder.frame = CGRectMake(0, _contentView.fs_height-weekdayHeight-weekdayMargin*2, _contentView.fs_width, 1.0);
|
||||||
_titleLabel.frame = CGRectMake(0, _bottomBorder.fs_bottom-titleHeight-weekdayMargin, titleWidth,titleHeight);
|
|
||||||
|
CGPoint titleHeaderOffset = self.calendar.appearance.headerTitleOffset;
|
||||||
|
_titleLabel.frame = CGRectMake(titleHeaderOffset.x,
|
||||||
|
titleHeaderOffset.y+_bottomBorder.fs_bottom-titleHeight-weekdayMargin,
|
||||||
|
titleWidth,
|
||||||
|
titleHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Properties
|
#pragma mark - Properties
|
||||||
|
|
@ -90,6 +94,8 @@
|
||||||
{
|
{
|
||||||
_titleLabel.font = self.calendar.appearance.headerTitleFont;
|
_titleLabel.font = self.calendar.appearance.headerTitleFont;
|
||||||
_titleLabel.textColor = self.calendar.appearance.headerTitleColor;
|
_titleLabel.textColor = self.calendar.appearance.headerTitleColor;
|
||||||
|
_titleLabel.textAlignment = self.calendar.appearance.headerTitleAlignment;
|
||||||
|
_bottomBorder.backgroundColor = self.calendar.appearance.headerSeparatorColor;
|
||||||
[self.weekdayView configureAppearance];
|
[self.weekdayView configureAppearance];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -97,9 +103,16 @@
|
||||||
{
|
{
|
||||||
_month = month;
|
_month = month;
|
||||||
_calendar.formatter.dateFormat = self.calendar.appearance.headerDateFormat;
|
_calendar.formatter.dateFormat = self.calendar.appearance.headerDateFormat;
|
||||||
BOOL usesUpperCase = (self.calendar.appearance.caseOptions & 15) == FSCalendarCaseOptionsHeaderUsesUpperCase;
|
BOOL usesUpperCase = (self.calendar.appearance.caseOptions & 15) == FSCalendarCaseOptionsHeaderUsesUpperCase;
|
||||||
|
BOOL usesCapitalized = (self.calendar.appearance.caseOptions & 15) == FSCalendarCaseOptionsHeaderUsesCapitalized;
|
||||||
|
|
||||||
NSString *text = [_calendar.formatter stringFromDate:_month];
|
NSString *text = [_calendar.formatter stringFromDate:_month];
|
||||||
text = usesUpperCase ? text.uppercaseString : text;
|
if (usesUpperCase) {
|
||||||
|
text = text.uppercaseString;
|
||||||
|
} else if (usesCapitalized) {
|
||||||
|
text = text.capitalizedString;
|
||||||
|
}
|
||||||
|
|
||||||
self.titleLabel.text = text;
|
self.titleLabel.text = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,18 +9,20 @@
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>8.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>$(PRODUCT_NAME)</string>
|
<string>$(PRODUCT_NAME)</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.8.0</string>
|
<string>2.8.3</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
<string>282</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
|
<key>net.goout.GoOut.groupIdentifier</key>
|
||||||
|
<string>$(GROUP_IDENTIFIER)</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendar.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarAppearance.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarCalculator.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarCell.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarCollectionView.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarCollectionViewLayout.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarConstants.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarDelegationFactory.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarDelegationProxy.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarDynamicHeader.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarExtensions.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarHeaderView.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarSeparatorDecorationView.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarStickyHeader.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarTransitionCoordinator.h
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../FSCalendarWeekdayView.h
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
// swift-tools-version:5.3
|
||||||
|
import PackageDescription
|
||||||
|
|
||||||
|
let package = Package(
|
||||||
|
name: "FSCalendar",
|
||||||
|
platforms: [.iOS(.v9)],
|
||||||
|
products: [
|
||||||
|
.library(
|
||||||
|
name: "FSCalendar",
|
||||||
|
targets: ["FSCalendar"]
|
||||||
|
),
|
||||||
|
],
|
||||||
|
targets: [
|
||||||
|
.target(
|
||||||
|
name: "FSCalendar",
|
||||||
|
dependencies: [],
|
||||||
|
path: "FSCalendar/"
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
@ -87,6 +87,13 @@ end
|
||||||
github "WenchaoD/FSCalendar"
|
github "WenchaoD/FSCalendar"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## SPM:
|
||||||
|
|
||||||
|
Add dependency:
|
||||||
|
```swift
|
||||||
|
.package(url: "https://github.com/WenchaoD/FSCalendar.git", from: "2.8.3")
|
||||||
|
```
|
||||||
|
|
||||||
## Manually:
|
## Manually:
|
||||||
* Drag all files under `FSCalendar` folder into your project. 👍
|
* Drag all files under `FSCalendar` folder into your project. 👍
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue