Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class CalendarDateRangePickerCell: UICollectionViewCell {
selectedView?.backgroundColor = selectedColor
selectedView?.layer.cornerRadius = height / 2
self.addSubview(selectedView!)
self.sendSubview(toBack: selectedView!)
self.sendSubviewToBack(selectedView!)

label.textColor = UIColor.white
}
Expand All @@ -79,7 +79,7 @@ class CalendarDateRangePickerCell: UICollectionViewCell {
halfBackgroundView = UIView(frame: CGRect(x: width / 2, y: 0, width: width / 2, height: height))
halfBackgroundView?.backgroundColor = highlightedColor
self.addSubview(halfBackgroundView!)
self.sendSubview(toBack: halfBackgroundView!)
self.sendSubviewToBack(halfBackgroundView!)

addRoundHighlightView()
}
Expand All @@ -91,7 +91,7 @@ class CalendarDateRangePickerCell: UICollectionViewCell {
halfBackgroundView = UIView(frame: CGRect(x: 0, y: 0, width: width / 2, height: height))
halfBackgroundView?.backgroundColor = highlightedColor
self.addSubview(halfBackgroundView!)
self.sendSubview(toBack: halfBackgroundView!)
self.sendSubviewToBack(halfBackgroundView!)

addRoundHighlightView()
}
Expand All @@ -103,7 +103,7 @@ class CalendarDateRangePickerCell: UICollectionViewCell {
roundHighlightView?.backgroundColor = highlightedColor
roundHighlightView?.layer.cornerRadius = height / 2
self.addSubview(roundHighlightView!)
self.sendSubview(toBack: roundHighlightView!)
self.sendSubviewToBack(roundHighlightView!)
}

func highlight() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class CalendarDateRangePickerViewController: UICollectionViewController {
collectionView?.backgroundColor = UIColor.white

collectionView?.register(CalendarDateRangePickerCell.self, forCellWithReuseIdentifier: cellReuseIdentifier)
collectionView?.register(CalendarDateRangePickerHeaderView.self, forSupplementaryViewOfKind: UICollectionElementKindSectionHeader, withReuseIdentifier: headerReuseIdentifier)
collectionView?.register(CalendarDateRangePickerHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: headerReuseIdentifier)
collectionView?.contentInset = collectionViewInsets

if minimumDate == nil {
Expand All @@ -58,11 +58,11 @@ public class CalendarDateRangePickerViewController: UICollectionViewController {
self.navigationItem.rightBarButtonItem?.isEnabled = selectedStartDate != nil && selectedEndDate != nil
}

func didTapCancel() {
@objc func didTapCancel() {
delegate.didCancelPickingDateRange()
}

func didTapDone() {
@objc func didTapDone() {
if selectedStartDate == nil || selectedEndDate == nil {
return
}
Expand Down Expand Up @@ -132,7 +132,7 @@ extension CalendarDateRangePickerViewController {

override public func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
switch kind {
case UICollectionElementKindSectionHeader:
case UICollectionView.elementKindSectionHeader:
let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: headerReuseIdentifier, for: indexPath) as! CalendarDateRangePickerHeaderView
headerView.label.text = getMonthLabel(date: getFirstDateForSection(section: indexPath.section))
return headerView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
DevelopmentTeam = 3EKA2B3YUL;
LastSwiftMigration = 0900;
LastSwiftMigration = 1010;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0900;
LastSwiftMigration = 1010;
TestTargetID = 607FACCF1AFB9204008FA782;
};
};
Expand Down Expand Up @@ -517,8 +517,8 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "com.miraan.CalendarDateRangePickerViewController-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -533,8 +533,8 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "com.miraan.CalendarDateRangePickerViewController-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -554,8 +554,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -571,8 +571,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
28 changes: 17 additions & 11 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.