diff --git a/.gitignore b/.gitignore
index d9ef2ee..c540ce3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,7 +58,7 @@ Pods/
# Add this line if you want to avoid checking in source code from the Xcode workspace
#
-# *.xcworkspace
+*.xcworkspace
# Carthage
#
diff --git a/Example/FastisExample.xcodeproj/project.pbxproj b/Example/FastisExample.xcodeproj/project.pbxproj
index 8d8e800..a291164 100644
--- a/Example/FastisExample.xcodeproj/project.pbxproj
+++ b/Example/FastisExample.xcodeproj/project.pbxproj
@@ -114,7 +114,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1140;
- LastUpgradeCheck = 1140;
+ LastUpgradeCheck = 1220;
ORGANIZATIONNAME = "RetailDriver LLC";
TargetAttributes = {
F3FCEE42244780FE000F966E = {
@@ -244,6 +244,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -304,6 +305,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -340,6 +342,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 48KFD5698Q;
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 14.2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -359,6 +362,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 48KFD5698Q;
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 14.2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
diff --git a/Example/FastisExample.xcworkspace/contents.xcworkspacedata b/Example/FastisExample.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 2f5fce5..0000000
--- a/Example/FastisExample.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
diff --git a/Example/FastisExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/FastisExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d9810..0000000
--- a/Example/FastisExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/Example/Podfile b/Example/Podfile
index ec7e549..17b9d95 100644
--- a/Example/Podfile
+++ b/Example/Podfile
@@ -1,4 +1,4 @@
-source 'https://github.com/CocoaPods/Specs.git'
+source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
use_frameworks!
diff --git a/Example/Podfile.lock b/Example/Podfile.lock
index d1f8f26..57ad3a5 100644
--- a/Example/Podfile.lock
+++ b/Example/Podfile.lock
@@ -1,5 +1,5 @@
PODS:
- - Fastis (1.0.3):
+ - Fastis (1.0.12):
- JTAppleCalendar (~> 8.0.0)
- PrettyCards (~> 1.0.0)
- SnapKit (~> 5.0.0)
@@ -11,7 +11,7 @@ DEPENDENCIES:
- Fastis (from `../`)
SPEC REPOS:
- https://github.com/CocoaPods/Specs.git:
+ trunk:
- JTAppleCalendar
- PrettyCards
- SnapKit
@@ -21,11 +21,11 @@ EXTERNAL SOURCES:
:path: "../"
SPEC CHECKSUMS:
- Fastis: 329990407f2477b7b5a15fe6ae0f9485350fdd8d
+ Fastis: f403980b285b38e2930b2473c4c4e3bfbb0e898c
JTAppleCalendar: 932cadea40b1051beab10f67843451d48ba16c99
PrettyCards: 14d7c36a286cbd25ba29d351e9c5473f8c94ca6f
SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
-PODFILE CHECKSUM: 3ca7a87691df1672969eb39bf0af8564af33681d
+PODFILE CHECKSUM: 1535660f8291b9f9d6e4c9762a7e5e6aa4397ec6
-COCOAPODS: 1.9.1
+COCOAPODS: 1.10.0
diff --git a/Example/Source/ViewController.swift b/Example/Source/ViewController.swift
index 5e3b36f..4ed6c29 100644
--- a/Example/Source/ViewController.swift
+++ b/Example/Source/ViewController.swift
@@ -99,8 +99,8 @@ class ViewController: UIViewController {
let fastisController = FastisController(mode: .range)
fastisController.title = "Choose range"
fastisController.initialValue = self.currentValue as? FastisRange
- fastisController.minimumDate = Calendar.current.date(byAdding: .month, value: -1, to: Date())
- fastisController.maximumDate = Date()
+ fastisController.minimumDate = Calendar.current.date(byAdding: .month, value: -2, to: Date())
+ fastisController.maximumDate = Calendar.current.date(byAdding: .month, value: 3, to: Date())
fastisController.allowToChooseNilDate = true
fastisController.shortcuts = [.today, .lastWeek, .lastMonth]
fastisController.doneHandler = { newValue in
diff --git a/Source/Extensions/Date + Utilits.swift b/Source/Extensions/Date + Utilits.swift
index 6e003e6..2897e86 100644
--- a/Source/Extensions/Date + Utilits.swift
+++ b/Source/Extensions/Date + Utilits.swift
@@ -11,7 +11,7 @@ import Foundation
extension Date {
internal func startOfMonth(in calendar: Calendar = .current) -> Date {
- return calendar.date(from: calendar.dateComponents([.year, .month], from: calendar.startOfDay(for: self)))!
+ return calendar.date(from: calendar.dateComponents([.year, .month], from: calendar.startOfDay(for: self)))!.startOfDay(in: calendar)
}
internal func endOfMonth(in calendar: Calendar = .current) -> Date {
diff --git a/Source/Views/Controller.swift b/Source/Views/Controller.swift
index 985937c..6d1e187 100644
--- a/Source/Views/Controller.swift
+++ b/Source/Views/Controller.swift
@@ -432,7 +432,7 @@ public class FastisController: UIViewController, JTACMonthVi
if self.privateSelectMonthOnHeaderTap, Value.mode == .range {
header.tapHandler = {
var fromDate = range.start.startOfMonth(in: self.currentCalendar)
- var toDate = range.end.endOfMonth(in: self.currentCalendar)
+ var toDate = range.start.endOfMonth(in: self.currentCalendar)
if let minDate = self.minimumDate {
if toDate < minDate { return }
else if fromDate < minDate {
diff --git a/Source/Views/DayCell.swift b/Source/Views/DayCell.swift
index 322a3eb..f9ca34d 100644
--- a/Source/Views/DayCell.swift
+++ b/Source/Views/DayCell.swift
@@ -89,7 +89,9 @@ class DayCell: JTACDayCell {
if let cornerRadius = config.customSelectionViewCornerRadius {
self.selectionBackgroundView.layer.cornerRadius = cornerRadius
}
- rangedBackgroundViewTopBootomConstraints.map{ $0.update(inset: config.rangedBackgroundViewInset)}
+ self.rangedBackgroundViewTopBootomConstraints.forEach({
+ $0.update(inset: config.rangedBackgroundViewInset)
+ })
}
public func configureSubviews() {