All Projects → MarcBruins → FSCalendar-Xamarin-iOS

MarcBruins / FSCalendar-Xamarin-iOS

Licence: MIT License
Binding for FSCalendar

Programming Languages

objective c
16641 projects - #2 most used programming language
C#
18002 projects

Projects that are alternatives of or similar to FSCalendar-Xamarin-iOS

WeakEventListener
The WeakEventListener allows the owner to be garbage collected if its only remaining link is an event handler.
Stars: ✭ 25 (-28.57%)
Mutual labels:  xamarin
Microcharts
Create cross-platform (Xamarin, Windows, ...) simple charts.
Stars: ✭ 1,742 (+4877.14%)
Mutual labels:  xamarin
Xamarin.Forms.ARToolkit
Augmented Reality Toolkit for Xamarin Forms
Stars: ✭ 15 (-57.14%)
Mutual labels:  xamarin
Xam.Forms.QRCode
A QRCode renderer based on SkiaSharp.
Stars: ✭ 16 (-54.29%)
Mutual labels:  xamarin
XamarinAzureChallenge
Create an iOS/Android app using Xamarin.Forms and connect it to a serverless Azure Function
Stars: ✭ 59 (+68.57%)
Mutual labels:  xamarin
termission
Cross-platform Serial (COM Port) / TCP Terminal with Scriptable Auto-Response
Stars: ✭ 39 (+11.43%)
Mutual labels:  xamarin
xamarin-forms-docs
This repository holds documentation for Xamarin Forms components
Stars: ✭ 15 (-57.14%)
Mutual labels:  xamarin
InteractiveAlert-Xamarin
Interactive alerts to Xamarin
Stars: ✭ 17 (-51.43%)
Mutual labels:  xamarin
XFFlipViewControl
An awesome animated Flippable View Control with Xamarin.Forms, or a Flipity Flippy Flippin' Flip View right here fellas! :D
Stars: ✭ 43 (+22.86%)
Mutual labels:  xamarin
DarkModeSplashScreen
A sample app for iOS and Android written in Xamarin.Forms showing how to implement a Splash Page for Dark Mode
Stars: ✭ 28 (-20%)
Mutual labels:  xamarin
Xamarin.Forms.MaskedEntry
📝 Use mask in your Xamarin.Forms apps
Stars: ✭ 17 (-51.43%)
Mutual labels:  xamarin
Movies
Buy movie tickets in advance, find movie times, and more at "Movies".
Stars: ✭ 33 (-5.71%)
Mutual labels:  xamarin
DevOpsExamples
A repo to show you how to use a private NuGet feed, such as Telerik, to restore packages in Azure DevOps, GitHub Actions, GitLab CI and AppCenter.
Stars: ✭ 16 (-54.29%)
Mutual labels:  xamarin
SokobanFabulous
Sokoban game for iOS and Android written in F# using Xamarin Fabulous framework
Stars: ✭ 21 (-40%)
Mutual labels:  xamarin
Toast
To use it in PCL or .NetStandard projects write this line of code : CrossToastPopUp.Current.ShowToastMessage("Message");
Stars: ✭ 51 (+45.71%)
Mutual labels:  xamarin
XamCall
XamDesign Xamarin Forms Call screen Ui Design
Stars: ✭ 25 (-28.57%)
Mutual labels:  xamarin
CreatingPlatformPlugins
A set of examples and documentation to aid in the development of cross-platform libraries and plugins.
Stars: ✭ 48 (+37.14%)
Mutual labels:  xamarin
SimpleXamarinGraphQL
An iOS and Android app built in Xamarin.Forms demonstrating how to interact with GitHub's GraphQL API
Stars: ✭ 18 (-48.57%)
Mutual labels:  xamarin
Xamarin.iOS.DatePickerDialog
Xamarin iOS C# port of https://github.com/squimer/DatePickerDialog-iOS-Swift
Stars: ✭ 24 (-31.43%)
Mutual labels:  xamarin
AppRopio.Mobile
AppRopio - mobile apps builder for iOS/Android based on Xamarin
Stars: ✭ 16 (-54.29%)
Mutual labels:  xamarin

This is a Xamarin iOS binding for https://github.com/WenchaoD/FSCalendar

logo

Apps Using Total Downloads
Travis Version Platform Carthage compatible
Languages

Updates

Table of contents

Screenshots

fscalendar-users

iPhone

fscalendar

iPad

fscalendar-ipad

Safe Orientation

fscalendar-scope-orientation-autolayout

Today Extension

iOS8/9 iOS10
today1 today2

DIY support

1

To customize your own cell, view DIY Example in Example-Swift or Example-Objc

Swipe-To-Choose

Single-Selection
Swipe-To-Choose
Multiple-Selection
Swipe-To-Choose
DIY
Swipe-To-Choose
1 2 3

Installation

CocoaPods:

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

NSCalendarExtension is required to get iOS7 compatibility.

  • 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

To use FSCalendar in Swift3, see Example-Swift for details.


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

Pre-knowledge

In Swift3, NSDate and NSDateFormatter have been renamed to Date and DateFormatter , see SwiftExample for details.

How to create NSDate object

  • By NSCalendar.
self.gregorian = [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];

Then:

NSDate *date = [gregorian dateWithEra:1 year:2016 month:9 day:10 hour:0 minute:0 second:0 nanosecond:0];
// 2016-09-10 00:00:00
  • Or by NSDateFormatter
self.formatter = [[NSDateFormatter alloc] init];
self.formatter.dateFormat = @"yyyy-MM-dd";

Then:

NSDate *date = [self.formatter dateFromString:@"2016-09-10"];

How to print out NSDate object

  • Use NSDateFormatter
self.formatter = [[NSDateFormatter alloc] init];
self.formatter.dateFormat = @"yyyy/MM/dd";
NSString *string = [self.formatter stringFromDate:date];
NSLog(@"Date is %@", string);

How to manipulate NSDate with NSCalendar

self.gregorian = [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
  • Get component of NSDate
NSInteger era = [self.gregorian component:NSCalendarUnitEra fromDate:date];
NSInteger year = [self.gregorian component:NSCalendarUnitYear fromDate:date];
NSInteger month = [self.gregorian component:NSCalendarUnitMonth fromDate:date];
NSInteger day = [self.gregorian component:NSCalendarUnitDay fromDate:date];
NSInteger hour = [self.gregorian component:NSCalendarUnitHour fromDate:date];
NSInteger minute = [self.gregorian component:NSCalendarUnitMinute fromDate:date];
...
  • Get next month
NSDate *nextMonth = [self.gregorain dateByAddingUnit:NSCalendarUnitMonth value:1 toDate:date options:0];
  • Get next day
NSDate *nextDay = [self.gregorain dateByAddingUnit:NSCalendarUnitDay value:1 toDate:date options:0];
  • Is date in today/tomorrow/yesterday/weekend
BOOL isToday = [self.gregorian isDateInToday:date];
BOOL isYesterday = [self.gregorian isDateInYesterday:date];
BOOL isTomorrow = [self.gregorian isDateInTomorrow:date];
BOOL isWeekend = [self.gregorian isDateInWeekend:date];
  • Compare two dates
BOOL sameDay = [self.gregorian isDate:date1 inSameDayAsDate:date2];
// Yes if the date1 and date2 are in same day


[self.gregorian compareDate:date1 toDate:date2 toUnitGranularity:unit];
// compare the era/year/month/day/hour/minute .etc ...
// return NSOrderAscending/NSOrderSame/NSOrderDecending

BOOL inSameUnit = [self.gregorian isDate:date1 equalToDate:date2 toUnitGranularity:unit];
// if the given unit (era/year/month/day/hour/minute .etc) are the same

Support this repo

  • Star this repo star

* Support with  
* Support with or

Contact

If your made a beautiful calendar with this library in your app, please take a screen shot and @me in twitter. Your help really means a lot to me!
如果你用这个库完成了一个外观漂亮的日历,希望你能将这个漂亮的日历截图在微博中@我,十分感谢!

License

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

###Documentation | More Usage | 简书

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].