Go to file
Wenchao Ding f2f680b906 Update buttons view controller with arrows
Update buttons view controller with arrows
2016-06-25 17:35:00 +08:00
Example Update buttons view controller with arrows 2016-06-25 17:35:00 +08:00
FSCalendar Fix problem while showsPlaceholder&showsScopeHandle&scrollDirection==vertical 2016-06-24 09:48:59 +08:00
SwiftExample Fix swift compile error 2016-05-19 13:15:56 +08:00
.gitignore Add event colors in delegate appearance 2016-03-24 21:36:14 +08:00
.travis.yml Move travis icon a bit 2016-03-26 13:50:19 +08:00
FSCalendar.podspec Bump version 2.2.0 2016-05-29 15:54:08 +08:00
LICENSE Update LICENSE 2016-03-29 16:42:54 +08:00
MOREUSAGE.md Update README.md 2016-03-14 12:56:32 +08:00
README.md Add QQ-group icon 2016-06-21 15:54:46 +08:00

README.md

fscalendar

Travis Version Platform Swift2 compatible Carthage compatible License QQ group Join the chat at https://gitter.im/WenchaoD/FSCalendar

中文介绍

Table of contents

Screenshots

iPhone

fscalendar

iPad

fscalendar-ipad

Working with AutoLayout and Orientation

fscalendar-scope-orientation-autolayout

Hide placeholder dates

fscalendar-showsplaceholder

Scope handle

scopehandle

FSCalendar doesn't change frame or the constraint by itself, see Adjusts frame dynamicly

Installation

CocoaPods:

  • For iOS8+: 👍
use_frameworks!
pod 'FSCalendar'
  • For iOS7+:
pod 'FSCalendar'
  • Alternatively to give it a test run, run the command:
pod try FSCalendar

Carthage:

  • For iOS8+
github "WenchaoD/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

Warning

FSCalendar doesn't change frame by itself, Please implement

  • For autoLayout
- (void)calendar:(FSCalendar *)calendar boundingRectWillChange:(CGRect)bounds animated:(BOOL)animated
{
    _calendarHeightConstraint.constant = CGRectGetHeight(bounds);
    [self.view layoutIfNeeded];
}
  • For manual layout
- (void)calendar:(FSCalendar *)calendar boundingRectWillChange:(CGRect)bounds animated:(BOOL)animated
{
    calendar.frame = (CGRect){calendar.frame.origin,bounds.size};
}

Roll with Interface Builder

fscalendar - ibdesignable

Advanced Usage

Support me via paypal


打赏支持

License

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

Contributions

Author

  • Email: f33chobits@gmail.com
  • Twitter: https://twitter.com/WenchaoD
  • 微博: http://www.weibo.com/u/2231723463