Compare commits
36 Commits
change_rel
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
5c12d8ce9e | |
|
|
e593f6dd49 | |
|
|
b3981a3c82 | |
|
|
2ca467918f | |
|
|
f00d48d78d | |
|
|
ec1a57f874 | |
|
|
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 |
|
|
@ -105,7 +105,7 @@
|
|||
|
||||
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
||||
{
|
||||
return [self.dateFormatter dateFromString:@"2016-07-08"];
|
||||
return [self.dateFormatter dateFromString:@"2020-07-08"];
|
||||
}
|
||||
|
||||
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
||||
|
|
|
|||
|
|
@ -42,68 +42,68 @@ NS_ASSUME_NONNULL_END
|
|||
if (self) {
|
||||
self.title = @"FSCalendar";
|
||||
|
||||
self.fillDefaultColors = @{@"2015/10/08":[UIColor purpleColor],
|
||||
@"2015/10/06":[UIColor greenColor],
|
||||
@"2015/10/18":[UIColor cyanColor],
|
||||
@"2015/10/22":[UIColor yellowColor],
|
||||
@"2015/11/08":[UIColor purpleColor],
|
||||
@"2015/11/06":[UIColor greenColor],
|
||||
@"2015/11/18":[UIColor cyanColor],
|
||||
@"2015/11/22":[UIColor yellowColor],
|
||||
@"2015/12/08":[UIColor purpleColor],
|
||||
@"2015/12/06":[UIColor greenColor],
|
||||
@"2015/12/18":[UIColor cyanColor],
|
||||
@"2015/12/22":[UIColor magentaColor]};
|
||||
self.fillDefaultColors = @{@"2020/10/08":[UIColor purpleColor],
|
||||
@"2020/10/06":[UIColor greenColor],
|
||||
@"2020/10/18":[UIColor cyanColor],
|
||||
@"2020/10/22":[UIColor yellowColor],
|
||||
@"2020/11/08":[UIColor purpleColor],
|
||||
@"2020/11/06":[UIColor greenColor],
|
||||
@"2020/11/18":[UIColor cyanColor],
|
||||
@"2020/11/22":[UIColor yellowColor],
|
||||
@"2020/12/08":[UIColor purpleColor],
|
||||
@"2020/12/06":[UIColor greenColor],
|
||||
@"2020/12/18":[UIColor cyanColor],
|
||||
@"2020/12/22":[UIColor magentaColor]};
|
||||
|
||||
self.fillSelectionColors = @{@"2015/10/08":[UIColor greenColor],
|
||||
@"2015/10/06":[UIColor purpleColor],
|
||||
@"2015/10/17":[UIColor grayColor],
|
||||
@"2015/10/21":[UIColor cyanColor],
|
||||
@"2015/11/08":[UIColor greenColor],
|
||||
@"2015/11/06":[UIColor purpleColor],
|
||||
@"2015/11/17":[UIColor grayColor],
|
||||
@"2015/11/21":[UIColor cyanColor],
|
||||
@"2015/12/08":[UIColor greenColor],
|
||||
@"2015/12/06":[UIColor purpleColor],
|
||||
@"2015/12/17":[UIColor grayColor],
|
||||
@"2015/12/21":[UIColor cyanColor]};
|
||||
self.fillSelectionColors = @{@"2020/10/08":[UIColor greenColor],
|
||||
@"2020/10/06":[UIColor purpleColor],
|
||||
@"2020/10/17":[UIColor grayColor],
|
||||
@"2020/10/21":[UIColor cyanColor],
|
||||
@"2020/11/08":[UIColor greenColor],
|
||||
@"2020/11/06":[UIColor purpleColor],
|
||||
@"2020/11/17":[UIColor grayColor],
|
||||
@"2020/11/21":[UIColor cyanColor],
|
||||
@"2020/12/08":[UIColor greenColor],
|
||||
@"2020/12/06":[UIColor purpleColor],
|
||||
@"2020/12/17":[UIColor grayColor],
|
||||
@"2020/12/21":[UIColor cyanColor]};
|
||||
|
||||
self.borderDefaultColors = @{@"2015/10/08":[UIColor brownColor],
|
||||
@"2015/10/17":[UIColor magentaColor],
|
||||
@"2015/10/21":FSCalendarStandardSelectionColor,
|
||||
@"2015/10/25":[UIColor blackColor],
|
||||
@"2015/11/08":[UIColor brownColor],
|
||||
@"2015/11/17":[UIColor magentaColor],
|
||||
@"2015/11/21":FSCalendarStandardSelectionColor,
|
||||
@"2015/11/25":[UIColor blackColor],
|
||||
@"2015/12/08":[UIColor brownColor],
|
||||
@"2015/12/17":[UIColor magentaColor],
|
||||
@"2015/12/21":FSCalendarStandardSelectionColor,
|
||||
@"2015/12/25":[UIColor blackColor]};
|
||||
self.borderDefaultColors = @{@"2020/10/08":[UIColor brownColor],
|
||||
@"2020/10/17":[UIColor magentaColor],
|
||||
@"2020/10/21":FSCalendarStandardSelectionColor,
|
||||
@"2020/10/25":[UIColor blackColor],
|
||||
@"2020/11/08":[UIColor brownColor],
|
||||
@"2020/11/17":[UIColor magentaColor],
|
||||
@"2020/11/21":FSCalendarStandardSelectionColor,
|
||||
@"2020/11/25":[UIColor blackColor],
|
||||
@"2020/12/08":[UIColor brownColor],
|
||||
@"2020/12/17":[UIColor magentaColor],
|
||||
@"2020/12/21":FSCalendarStandardSelectionColor,
|
||||
@"2020/12/25":[UIColor blackColor]};
|
||||
|
||||
self.borderSelectionColors = @{@"2015/10/08":[UIColor redColor],
|
||||
@"2015/10/17":[UIColor purpleColor],
|
||||
@"2015/10/21":FSCalendarStandardSelectionColor,
|
||||
@"2015/10/25":FSCalendarStandardTodayColor,
|
||||
@"2015/11/08":[UIColor redColor],
|
||||
@"2015/11/17":[UIColor purpleColor],
|
||||
@"2015/11/21":FSCalendarStandardSelectionColor,
|
||||
@"2015/11/25":FSCalendarStandardTodayColor,
|
||||
@"2015/12/08":[UIColor redColor],
|
||||
@"2015/12/17":[UIColor purpleColor],
|
||||
@"2015/12/21":FSCalendarStandardSelectionColor,
|
||||
@"2015/12/25":FSCalendarStandardTodayColor};
|
||||
self.borderSelectionColors = @{@"2020/10/08":[UIColor redColor],
|
||||
@"2020/10/17":[UIColor purpleColor],
|
||||
@"2020/10/21":FSCalendarStandardSelectionColor,
|
||||
@"2020/10/25":FSCalendarStandardTodayColor,
|
||||
@"2020/11/08":[UIColor redColor],
|
||||
@"2020/11/17":[UIColor purpleColor],
|
||||
@"2020/11/21":FSCalendarStandardSelectionColor,
|
||||
@"2020/11/25":FSCalendarStandardTodayColor,
|
||||
@"2020/12/08":[UIColor redColor],
|
||||
@"2020/12/17":[UIColor purpleColor],
|
||||
@"2020/12/21":FSCalendarStandardSelectionColor,
|
||||
@"2020/12/25":FSCalendarStandardTodayColor};
|
||||
|
||||
|
||||
self.datesWithEvent = @[@"2015-10-03",
|
||||
@"2015-10-06",
|
||||
@"2015-10-12",
|
||||
@"2015-10-25"];
|
||||
self.datesWithEvent = @[@"2020-10-03",
|
||||
@"2020-10-06",
|
||||
@"2020-10-12",
|
||||
@"2020-10-25"];
|
||||
|
||||
self.datesWithMultipleEvents = @[@"2015-10-08",
|
||||
@"2015-10-16",
|
||||
@"2015-10-20",
|
||||
@"2015-10-28"];
|
||||
self.datesWithMultipleEvents = @[@"2020-10-08",
|
||||
@"2020-10-16",
|
||||
@"2020-10-20",
|
||||
@"2020-10-28"];
|
||||
|
||||
|
||||
self.gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
|
||||
|
|
@ -134,7 +134,7 @@ NS_ASSUME_NONNULL_END
|
|||
[self.view addSubview: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:)];
|
||||
self.navigationItem.rightBarButtonItem = todayItem;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,6 @@
|
|||
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>"; };
|
||||
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>"; };
|
||||
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; };
|
||||
|
|
@ -162,6 +161,7 @@
|
|||
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>"; };
|
||||
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; };
|
||||
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; };
|
||||
|
|
@ -261,6 +261,7 @@
|
|||
30B0BABC1B8D8E22004B9476 /* FSCalendar */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9C88197F25F26B2F00E180CD /* Info.plist */,
|
||||
30B0BABF1B8D8E22004B9476 /* FSCalendar.h */,
|
||||
30B0BAC01B8D8E22004B9476 /* FSCalendar.m */,
|
||||
30B0BAC11B8D8E22004B9476 /* FSCalendarAppearance.h */,
|
||||
|
|
@ -292,20 +293,11 @@
|
|||
309225381B905C4300123031 /* FSCalendarConstants.h */,
|
||||
309225391B905C4300123031 /* FSCalendarConstants.m */,
|
||||
30B0BAC51B8D8E22004B9476 /* FSCalendarDynamicHeader.h */,
|
||||
30B0BAF31B8D9A91004B9476 /* Supporting Files */,
|
||||
);
|
||||
name = FSCalendar;
|
||||
path = ../FSCalendar;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
30B0BAF31B8D9A91004B9476 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
30B0BACA1B8D8E22004B9476 /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
30D55B0D1C9023E400BB43D5 /* Hide Placeholders */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -588,10 +580,9 @@
|
|||
};
|
||||
buildConfigurationList = EE0D7FC21B89C5D3003C287B /* Build configuration list for PBXProject "FSCalendar" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
Base,
|
||||
ja,
|
||||
|
|
@ -895,7 +886,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
DEVELOPMENT_TEAM = HZF422TY46;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendarExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
|
@ -909,7 +900,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
DEVELOPMENT_TEAM = HZF422TY46;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendarExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
|
@ -932,8 +923,9 @@
|
|||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/../FSCalendar/Info.plist";
|
||||
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";
|
||||
MARKETING_VERSION = 2.8.3;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendar;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
|
|
@ -954,8 +946,9 @@
|
|||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/../FSCalendar/Info.plist";
|
||||
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";
|
||||
MARKETING_VERSION = 2.8.3;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendar;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
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];
|
||||
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)];
|
||||
[swipeStart pressForDuration:0.8 thenDragToCoordinate:swipeEnd];
|
||||
|
||||
[calendar swipeUp];
|
||||
[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)];
|
||||
[swipeStart pressForDuration:0.8 thenDragToCoordinate:swipeEnd];
|
||||
[calendar swipeDown];
|
||||
|
|
|
|||
|
|
@ -114,20 +114,13 @@ NS_ASSUME_NONNULL_END
|
|||
self.dateFormatter = [[NSDateFormatter alloc] init];
|
||||
self.dateFormatter.dateFormat = @"yyyy-MM-dd";
|
||||
|
||||
self.minimumDate = [self.dateFormatter dateFromString:@"2016-02-03"];
|
||||
self.maximumDate = [self.dateFormatter dateFromString:@"2021-04-10"];
|
||||
self.minimumDate = [self.dateFormatter dateFromString:@"2020-02-03"];
|
||||
self.maximumDate = [self.dateFormatter dateFromString:@"2023-04-10"];
|
||||
|
||||
self.calendar.accessibilityIdentifier = @"calendar";
|
||||
|
||||
[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
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ NS_ASSUME_NONNULL_END
|
|||
calendar.delegate = self;
|
||||
calendar.placeholderType = FSCalendarPlaceholderTypeNone;
|
||||
calendar.adjustsBoundingRectWhenChangingMonths = YES;
|
||||
calendar.currentPage = [self.dateFormatter dateFromString:@"2016-06-01"];
|
||||
calendar.currentPage = [self.dateFormatter dateFromString:@"2020-06-01"];
|
||||
calendar.firstWeekday = 2;
|
||||
calendar.scrollDirection = FSCalendarScrollDirectionVertical;
|
||||
[self.view addSubview:calendar];
|
||||
|
|
@ -126,12 +126,12 @@ NS_ASSUME_NONNULL_END
|
|||
|
||||
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
||||
{
|
||||
return [self.dateFormatter dateFromString:@"2016-01-08"];
|
||||
return [self.dateFormatter dateFromString:@"2020-01-08"];
|
||||
}
|
||||
|
||||
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
||||
{
|
||||
return [self.dateFormatter dateFromString:@"2018-10-08"];
|
||||
return [self.dateFormatter dateFromString:@"2023-10-08"];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ NS_ASSUME_NONNULL_END
|
|||
self = [super init];
|
||||
if (self) {
|
||||
self.title = @"FSCalendar";
|
||||
self.images = @{@"2016/11/01":[UIImage imageNamed:@"icon_cat"],
|
||||
@"2016/11/05":[UIImage imageNamed:@"icon_footprint"],
|
||||
@"2016/11/20":[UIImage imageNamed:@"icon_cat"],
|
||||
@"2016/11/07":[UIImage imageNamed:@"icon_footprint"]};
|
||||
self.images = @{@"2020/11/01":[UIImage imageNamed:@"icon_cat"],
|
||||
@"2020/11/05":[UIImage imageNamed:@"icon_footprint"],
|
||||
@"2020/11/20":[UIImage imageNamed:@"icon_cat"],
|
||||
@"2020/11/07":[UIImage imageNamed:@"icon_footprint"]};
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ NS_ASSUME_NONNULL_END
|
|||
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(), ^{
|
||||
|
|
@ -115,12 +115,12 @@ NS_ASSUME_NONNULL_END
|
|||
|
||||
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
||||
{
|
||||
return [self.dateFormatter dateFromString:@"2016/10/01"];
|
||||
return [self.dateFormatter dateFromString:@"2020/10/01"];
|
||||
}
|
||||
|
||||
- (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
|
||||
{
|
||||
return [self.dateFormatter dateFromString:@"2016-07-08"];
|
||||
return [self.dateFormatter dateFromString:@"2020-07-08"];
|
||||
}
|
||||
|
||||
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
||||
|
|
|
|||
|
|
@ -54,18 +54,18 @@
|
|||
|
||||
self.calendar.appearance.caseOptions = FSCalendarCaseOptionsHeaderUsesUpperCase|FSCalendarCaseOptionsWeekdayUsesUpperCase;
|
||||
|
||||
self.datesShouldNotBeSelected = @[@"2016/08/07",
|
||||
@"2016/09/07",
|
||||
@"2016/10/07",
|
||||
@"2016/11/07",
|
||||
@"2016/12/07",
|
||||
@"2016/01/07",
|
||||
@"2016/02/07"];
|
||||
self.datesShouldNotBeSelected = @[@"2020/08/07",
|
||||
@"2020/09/07",
|
||||
@"2020/10/07",
|
||||
@"2020/11/07",
|
||||
@"2020/12/07",
|
||||
@"2020/01/07",
|
||||
@"2020/02/07"];
|
||||
|
||||
self.datesWithEvent = @[@"2016-12-03",
|
||||
@"2016-12-07",
|
||||
@"2016-12-15",
|
||||
@"2016-12-25"];
|
||||
self.datesWithEvent = @[@"2020-12-03",
|
||||
@"2020-12-07",
|
||||
@"2020-12-15",
|
||||
@"2020-12-25"];
|
||||
|
||||
self.lunarFormatter = [[LunarFormatter alloc] init];
|
||||
}
|
||||
|
|
@ -81,7 +81,8 @@
|
|||
if ([[UIDevice currentDevice].model hasPrefix:@"iPad"]) {
|
||||
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";
|
||||
|
||||
|
|
@ -117,12 +118,12 @@
|
|||
|
||||
- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
|
||||
{
|
||||
return [self.dateFormatter1 dateFromString:@"2016/10/01"];
|
||||
return [self.dateFormatter1 dateFromString:@"2020/10/01"];
|
||||
}
|
||||
|
||||
- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
|
||||
{
|
||||
return [self.dateFormatter1 dateFromString:@"2018/05/31"];
|
||||
return [self.dateFormatter1 dateFromString:@"2023/05/31"];
|
||||
}
|
||||
|
||||
#pragma mark - FSCalendarDelegate
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
Pod::Spec.new do |s|
|
||||
|
||||
s.name = "FSCalendar"
|
||||
s.version = "2.8.1"
|
||||
s.version = "2.8.4"
|
||||
s.summary = "A superiorly awesome iOS7+ calendar control, compatible with Objective-C and Swift."
|
||||
|
||||
s.homepage = "https://github.com/WenchaoD/FSCalendar"
|
||||
s.screenshots = "https://cloud.githubusercontent.com/assets/5186464/10262249/4fabae40-69f2-11e5-97ab-afbacd0a3da2.jpg"
|
||||
s.license = 'MIT'
|
||||
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.ios.deployment_target = '8.0'
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
|||
_firstWeekday = 1;
|
||||
[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];
|
||||
|
||||
|
||||
|
|
@ -699,7 +699,7 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
|||
_today = nil;
|
||||
} else {
|
||||
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) {
|
||||
[self.visibleCells makeObjectsPerformSelector:@selector(setDateIsToday:) withObject:nil];
|
||||
|
|
@ -717,7 +717,7 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
|||
{
|
||||
[self requestBoundingDatesIfNecessary];
|
||||
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]) {
|
||||
[self scrollToPageForDate:currentPage animated:animated];
|
||||
}
|
||||
|
|
@ -1035,7 +1035,7 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
|||
|
||||
- (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]) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1058,7 +1058,7 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
|||
|
||||
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];
|
||||
|
||||
BOOL shouldSelect = YES;
|
||||
|
|
@ -1532,9 +1532,9 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
|||
_needsRequestingBoundingDates = NO;
|
||||
self.formatter.dateFormat = @"yyyy-MM-dd";
|
||||
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"];
|
||||
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.");
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ typedef NS_ENUM(NSUInteger, FSCalendarSeparators) {
|
|||
|
||||
typedef NS_OPTIONS(NSUInteger, FSCalendarCaseOptions) {
|
||||
FSCalendarCaseOptionsHeaderUsesDefaultCase = 0,
|
||||
FSCalendarCaseOptionsHeaderUsesUpperCase = 1,
|
||||
FSCalendarCaseOptionsHeaderUsesUpperCase = 1 << 0,
|
||||
FSCalendarCaseOptionsHeaderUsesCapitalized = 1 << 1,
|
||||
|
||||
FSCalendarCaseOptionsWeekdayUsesDefaultCase = 0 << 4,
|
||||
FSCalendarCaseOptionsWeekdayUsesUpperCase = 1 << 4,
|
||||
|
|
@ -63,6 +64,11 @@ typedef NS_OPTIONS(NSUInteger, FSCalendarCaseOptions) {
|
|||
*/
|
||||
@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.
|
||||
*/
|
||||
|
|
@ -103,11 +109,21 @@ typedef NS_OPTIONS(NSUInteger, FSCalendarCaseOptions) {
|
|||
*/
|
||||
@property (strong, nonatomic) UIColor *headerTitleColor;
|
||||
|
||||
/**
|
||||
* The color oh month header separator
|
||||
*/
|
||||
@property (strong, nonatomic) UIColor *headerSeparatorColor;
|
||||
|
||||
/**
|
||||
* The date format of the month header.
|
||||
*/
|
||||
@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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -36,8 +36,11 @@
|
|||
_headerTitleFont = [UIFont systemFontOfSize:FSCalendarStandardHeaderTextSize];
|
||||
|
||||
_headerTitleColor = FSCalendarStandardTitleTextColor;
|
||||
_headerSeparatorColor = FSCalendarStandardLineColor;
|
||||
_headerDateFormat = @"MMMM yyyy";
|
||||
_headerMinimumDissolvedAlpha = 0.2;
|
||||
_headerTitleOffset = CGPointZero;
|
||||
_headerTitleAlignment = NSTextAlignmentCenter;
|
||||
_weekdayTextColor = FSCalendarStandardTitleTextColor;
|
||||
_caseOptions = FSCalendarCaseOptionsHeaderUsesDefaultCase|FSCalendarCaseOptionsWeekdayUsesDefaultCase;
|
||||
|
||||
|
|
@ -111,6 +114,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)setHeaderTitleOffset:(CGPoint)headerTitleOffset {
|
||||
if (!CGPointEqualToPoint(_headerTitleOffset, headerTitleOffset)) {
|
||||
_headerTitleOffset = headerTitleOffset;
|
||||
[self.calendar configureAppearance];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setTitleOffset:(CGPoint)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
|
||||
{
|
||||
if (_headerMinimumDissolvedAlpha != headerMinimumDissolvedAlpha) {
|
||||
|
|
@ -418,6 +436,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)setHeaderTitleAlignment:(NSTextAlignment)headerTitleAlignment
|
||||
{
|
||||
if (_headerTitleAlignment != headerTitleAlignment) {
|
||||
_headerTitleAlignment = headerTitleAlignment;
|
||||
[self.calendar configureAppearance];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setCaseOptions:(FSCalendarCaseOptions)caseOptions
|
||||
{
|
||||
if (_caseOptions != caseOptions) {
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@
|
|||
if (self.calendar.placeholderType == FSCalendarPlaceholderTypeFillSixRows) return 6;
|
||||
|
||||
NSNumber *rowCount = self.rowCounts[month];
|
||||
if (!rowCount) {
|
||||
if (rowCount == nil) {
|
||||
NSDate *firstDayOfMonth = [self.gregorian fs_firstDayOfMonth:month];
|
||||
NSInteger weekdayOfFirstDay = [self.gregorian component:NSCalendarUnitWeekday fromDate:firstDayOfMonth];
|
||||
NSInteger numberOfDaysInMonth = [self.gregorian fs_numberOfDaysInMonth:month];
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@
|
|||
components.day = - (weekdayComponents.weekday - self.firstWeekday);
|
||||
components.day = (components.day-7) % 7;
|
||||
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;
|
||||
return firstDayOfWeek;
|
||||
}
|
||||
|
|
@ -184,7 +184,7 @@
|
|||
components.day = - (weekdayComponents.weekday - self.firstWeekday);
|
||||
components.day = (components.day-7) % 7 + 6;
|
||||
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;
|
||||
return lastDayOfWeek;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,8 +156,8 @@
|
|||
FSCalendarAppearance *appearance = self.calendar.appearance;
|
||||
cell.titleLabel.font = appearance.headerTitleFont;
|
||||
cell.titleLabel.textColor = appearance.headerTitleColor;
|
||||
cell.titleLabel.textAlignment = appearance.headerTitleAlignment;
|
||||
_calendar.formatter.dateFormat = appearance.headerDateFormat;
|
||||
BOOL usesUpperCase = (appearance.caseOptions & 15) == FSCalendarCaseOptionsHeaderUsesUpperCase;
|
||||
NSString *text = nil;
|
||||
switch (self.calendar.transitionCoordinator.representingScope) {
|
||||
case FSCalendarScopeMonth: {
|
||||
|
|
@ -189,7 +189,13 @@
|
|||
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 setNeedsLayout];
|
||||
}
|
||||
|
|
@ -211,7 +217,6 @@
|
|||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
|
||||
titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
|
||||
titleLabel.numberOfLines = 0;
|
||||
[self.contentView addSubview:titleLabel];
|
||||
|
|
@ -229,8 +234,11 @@
|
|||
- (void)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) {
|
||||
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;
|
||||
|
||||
_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
|
||||
|
|
@ -90,6 +94,8 @@
|
|||
{
|
||||
_titleLabel.font = self.calendar.appearance.headerTitleFont;
|
||||
_titleLabel.textColor = self.calendar.appearance.headerTitleColor;
|
||||
_titleLabel.textAlignment = self.calendar.appearance.headerTitleAlignment;
|
||||
_bottomBorder.backgroundColor = self.calendar.appearance.headerSeparatorColor;
|
||||
[self.weekdayView configureAppearance];
|
||||
}
|
||||
|
||||
|
|
@ -97,9 +103,16 @@
|
|||
{
|
||||
_month = month;
|
||||
_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];
|
||||
text = usesUpperCase ? text.uppercaseString : text;
|
||||
if (usesUpperCase) {
|
||||
text = text.uppercaseString;
|
||||
} else if (usesCapitalized) {
|
||||
text = text.capitalizedString;
|
||||
}
|
||||
|
||||
self.titleLabel.text = text;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,18 +9,20 @@
|
|||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>8.0</string>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<string>2.8.3</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<string>282</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
<key>net.goout.GoOut.groupIdentifier</key>
|
||||
<string>$(GROUP_IDENTIFIER)</string>
|
||||
</dict>
|
||||
</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/"
|
||||
)
|
||||
]
|
||||
)
|
||||
Loading…
Reference in New Issue