Go to file
Wenchao Ding 828f8bbfbf Update to 0.1
Update to 0.1
2015-03-05 17:48:09 +08:00
Example Release 0.1 2015-03-05 17:45:49 +08:00
Pod Release 0.1 2015-03-05 17:45:49 +08:00
.gitignore Initial commit 2015-02-13 22:10:59 +08:00
.travis.yml Initial commit 2015-02-13 22:10:59 +08:00
FSCalendar.podspec Update to 0.1 2015-03-05 17:48:09 +08:00
LICENSE Initial commit 2015-02-13 22:10:59 +08:00
README-cn.md Release 0.1 2015-03-05 17:45:49 +08:00
README.md Release 0.1 2015-03-05 17:45:49 +08:00

README.md

FSCalendar

##中文文档

Features

1. Smooth Scrolling and directions(vertical/horizotal)

animate fscalendar-click

2. Appearance adjustment

appearance

3. Subtitle(Provided by FSCalendarDataSource,not only Chinese)

subtitle1

4. iPad compatible

fscalendar-ipad

Usage

  • Using cocoapods:pod 'FSCalendar'
  • Manually: Drag all .h and .m files in FSCalendar group to your project

#import FSCalendar.h

1. Simple DataSource/Delegate Pattern (IBOutlet supported)

_calendar.dataSource = self; 
_calendar.delegate = self;

FSCalendarDataSource

  • (NSString *)calendar:(FSCalendar *)calendar subtitleForDate:(NSDate *)date; // set subtitle
  • (BOOL)calendar:(FSCalendar *)calendar hasEventForDate:(NSDate *)date; // set event dot

FSCalendarDelegate

  • (BOOL)calendar:(FSCalendar *)calendar shouldSelectDate:(NSDate *)date;
  • (void)calendar:(FSCalendar *)calendar didSelectDate:(NSDate *)date;
  • (void)calendarCurrentMonthDidChange:(FSCalendar *)calendar;

2. Page Direction Supported

_calendar.flow = FSCalendarFlowVertical; //Change to vertical flow, default is FSCalendarFlowHorizontal

3. Flexible Appearance Customization

[[FSCalendar appearance] setWeekdayTextColor:[UIColor redColor]];   // week symbol color
[[FSCalendar appearance] setHeaderTitleColor:[UIColor darkGrayColor]]; // header text color
[[FSCalendar appearance] setEventColor:[UIColor greenColor]]; // event mark color
[[FSCalendar appearance] setSelectionColor:[UIColor blueColor]]; // selection fill color
[[FSCalendar appearance] setHeaderDateFormat:@"yyyy-MM"]; // header date format
[[FSCalendar appearance] setMinDissolvedAlpha:0.5]; // change to 1.0 to make header no alpha
[[FSCalendar appearance] setTodayColor:[UIColor redColor]]; // today fill color
[[FSCalendar appearance] setUnitStyle:FSCalendarUnitStyleCircle]; // shape of today/selection fill color.Circle/Fectangle

4. Header (IBOutlet supported)

FSCalendarHeader *header = [[FSCalendarHeader alloc] initWithFrame:CGRectMake(0,0,_calendar.frame.size.width,44)];
_calendar.header = header;

For more appearance and other usage, look into FSCalendar.h

Requirements

ios 7.0

Known issues

  1. The title size changed as we change frame size of FSCalendar Automatically adjusting font size based on the frame size is default behavior of FSCalendadr, to disable it: _calendar.autoAdjustTitle = NO; _calendar.titleFont = [Your custom font] _calendar.subtitleFont = [Your custom font]

    titleFont and subtitleFont is also available for UIAppearance selector, but would not take any change if autoAdjustTitle value is YES

Author

Wenchao Ding, f33chobits@gmail.com

License

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

Others

  • If FSCalendar cannot meet your requirment, welcome to submit issues or pull request
  • If you are using this library and using custom color modulation, please take a screenshot for your calendar appearance here, this will help others better matching color in their apps, thanks