- For iOS8+: ๐
use_frameworks!
pod 'FSCalendar'- For iOS7+:
pod 'FSCalendar'- Alternatively to give it a test run, run the command:
pod try FSCalendar- For iOS8+
github "WenchaoD/FSCalendar"- Drag all files under
FSCalendarfolder into your project. ๐
Only the methods marked "๐" support IBInspectable / IBDesignable feature. Have fun with Interface builder
- Drag an UIView object to ViewController Scene
- Change the
Custom ClasstoFSCalendar - Link
dataSourceanddelegateto the ViewController
- Finally, you should implement
FSCalendarDataSourceandFSCalendarDelegatein ViewController.m
@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;- To use
FSCalendarin swift, you need to Create Bridge Header first.
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// 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};
}- To view more usage, download the zip file and read the example.
- Or you could refer to this document
- To view the full documentation, see CocoaPods Documentation
- Star this repo.
- Send your calendar screenshot or
itunes link addresshere.
FSCalendar is available under the MIT license. See the LICENSE file for more info.
- Issues and pull requests are absolutely welcome.
- For code contributions, please follow Coding Guidelines for Cocoa
- Email:
f33chobits@gmail.com






