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