From 2b084bd8f0e184da36fa1980262fb3e4ba8258d0 Mon Sep 17 00:00:00 2001 From: Wenchao Ding Date: Sun, 28 Aug 2016 14:26:37 +0800 Subject: [PATCH] Update example Update example --- Example/FullScreenExampleViewController.m | 1 - FSCalendar/FSCalendar.m | 2 +- SwiftExample/SwiftExample/ViewController.swift | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Example/FullScreenExampleViewController.m b/Example/FullScreenExampleViewController.m index b66f3fb7..26a1bb06 100644 --- a/Example/FullScreenExampleViewController.m +++ b/Example/FullScreenExampleViewController.m @@ -47,7 +47,6 @@ - (void)loadView calendar.firstWeekday = 2; calendar.placeholderType = FSCalendarPlaceholderTypeFillHeadTail; calendar.appearance.caseOptions = FSCalendarCaseOptionsWeekdayUsesSingleUpperCase|FSCalendarCaseOptionsHeaderUsesUpperCase; - calendar.placeholderType = FSCalendarPlaceholderTypeFillHeadTail; [self.view addSubview:calendar]; self.calendar = calendar; diff --git a/FSCalendar/FSCalendar.m b/FSCalendar/FSCalendar.m index 291aa29b..0bd3e550 100644 --- a/FSCalendar/FSCalendar.m +++ b/FSCalendar/FSCalendar.m @@ -1056,7 +1056,7 @@ - (CGFloat)preferredPadding - (BOOL)floatingMode { - return _scrollEnabled && !_pagingEnabled; + return _scope == FSCalendarScopeMonth && _scrollEnabled && !_pagingEnabled; } - (void)setShowsScopeHandle:(BOOL)showsScopeHandle diff --git a/SwiftExample/SwiftExample/ViewController.swift b/SwiftExample/SwiftExample/ViewController.swift index f1903691..ba1e21a3 100644 --- a/SwiftExample/SwiftExample/ViewController.swift +++ b/SwiftExample/SwiftExample/ViewController.swift @@ -17,9 +17,10 @@ class ViewController: UIViewController, FSCalendarDataSource, FSCalendarDelegate "20160206","20160306","20160406","20160506","20160606","20160706"] override func viewDidLoad() { super.viewDidLoad() - calendar.scrollDirection = .Vertical calendar.appearance.caseOptions = [.HeaderUsesUpperCase,.WeekdayUsesUpperCase] calendar.selectDate(calendar.dateWithYear(2015, month: 10, day: 10)) +// calendar.scope = .Week + calendar.scopeGesture.enabled = true // calendar.allowsMultipleSelection = true // Uncomment this to test month->week and week->month transition