Go to file
dingwenchao cd44c39f4b Better scope transition behavior
1. Better scope transition behavior
2. Remove redundant lines
3. Improve example
2016-01-22 14:51:12 +08:00
Example Better scope transition behavior 2016-01-22 14:51:12 +08:00
FSCalendar Better scope transition behavior 2016-01-22 14:51:12 +08:00
SwiftExample Bump version 1.8.1.beta 2016-01-21 15:52:28 +08:00
.gitignore Update Example 2015-11-17 15:27:57 +08:00
FSCalendar.podspec 1.8.0.beta 2016-01-21 16:05:57 +08:00
LICENSE Add delegate methods 2015-10-04 10:27:45 +08:00
MOREUSAGE.md Fix warnings in demo project 2015-11-02 17:49:41 +08:00
README.md Bump version 1.8.1.beta 2016-01-21 15:52:28 +08:00

README.md

fscalendar

Version Platform Swift2 compatible Carthage compatible License

Screenshots

iPhone

fscalendar

iPad

fscalendar-ipad

New Feature - Focus on selected date

fscalendar-scope

How to use

  • Use focusOnSingleSelectedDate, default is YES
calendar.focusOnSingleSelectedDate = YES;
  • Only available on single selection mode (by default)
calendar.allowsSelection = YES;
calendar.allowsMultipleSelection = NO;
  • Try to change scope
[calendar setScope:FSCalendarScopeWeek animated:YES];

Installation

Cocoapods:

  • For iOS8+: 👍
use_frameworks!
pod 'FSCalendar'
  • For iOS7+:
pod 'FSCalendar'

Carthage:

  • For iOS8+
github "WenchaoIOS/FSCalendar"

Manually:

  • Drag all files under FSCalendar folder into your project. 👍

Support IBInspectable / IBDesignable

Only the methods marked "👍" support IBInspectable / IBDesignable feature. Have fun with Interface builder

Setup

Use Interface Builder

  1. Drag an UIView object to ViewController Scene
  2. Change the Custom Class to FSCalendar
  3. Link dataSource and delegate to the ViewController

fscalendar-ib

  1. Finally, you should implement FSCalendarDataSource and FSCalendarDelegate in ViewController.m

Or use code

@property (weak , nonatomic) FSCalendar *calendar;
// In loadView(Recommended) or viewDidLoad
FSCalendar *calendar = [[FSCalendar alloc] initWithFrame:CGRectMake(0, 0, 320, 300)];
calendar.dataSource = self;
calendar.delegate = self;
[self.view addSubview:calendar];
self.calendar = calendar;

Or swift

private weak var calendar: FSCalendar!
// In loadView or viewDidLoad
let calendar = FSCalendar(frame: CGRect(x: 0, y: 0, width: 320, height: 300))
calendar.dataSource = self
calendar.delegate = self
view.addSubview(calendar)
self.calendar = calendar

Indian

calendar.identifier = NSCalendarIdentifierIndian;

indian

Persian

calendar.identifier = NSCalendarIdentifierPesian;

persian

Hebrew

calendar.identifier = NSCalendarIdentifierHebrew;

hebrew

Islamic

calendar.identifier = NSCalendarIdentifierIslamic;

islamic

Roll with Interface Builder

fscalendar - ibdesignable

More Usage

  • To view more usage, download the zip file and read the example.
  • Or your could refer to this document

If you like this repo

  • Star this repo.
  • Send your calendar screenshot or itunes link address here.

Support me via paypal

Contact

  • Email: f33chobits@gmail.com

License

FSCalendar is available under the MIT license. See the LICENSE file for more info.