Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
Update example
  • Loading branch information
WenchaoD committed Aug 28, 2016
1 parent 6cf6176 commit 2b084bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion Example/FullScreenExampleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion FSCalendar/FSCalendar.m
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ - (CGFloat)preferredPadding

- (BOOL)floatingMode
{
return _scrollEnabled && !_pagingEnabled;
return _scope == FSCalendarScopeMonth && _scrollEnabled && !_pagingEnabled;
}

- (void)setShowsScopeHandle:(BOOL)showsScopeHandle
Expand Down
3 changes: 2 additions & 1 deletion SwiftExample/SwiftExample/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b084bd

Please sign in to comment.