Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lufzi/pai
📅 Calendar view library for iOS.
https://github.com/lufzi/pai
calendar ios swift
Last synced: about 1 month ago
JSON representation
📅 Calendar view library for iOS.
- Host: GitHub
- URL: https://github.com/lufzi/pai
- Owner: lufzi
- License: mit
- Created: 2017-12-21T13:48:56.000Z (about 7 years ago)
- Default Branch: develop
- Last Pushed: 2018-05-07T09:37:10.000Z (over 6 years ago)
- Last Synced: 2024-12-01T16:16:57.187Z (about 1 month ago)
- Topics: calendar, ios, swift
- Language: Swift
- Homepage:
- Size: 191 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Pai
[![BuddyBuild](https://dashboard.buddybuild.com/api/statusImage?appID=5a3bc4bd2736ea00014a8b80&branch=master&build=latest)](https://dashboard.buddybuild.com/apps/5a3bc4bd2736ea00014a8b80/build/latest?branch=master)
[![Build Status](https://travis-ci.org/lkmfz/Pai.svg?branch=master)](https://travis-ci.org/lkmfz/Pai)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Pai.svg)](https://cocoapods.org/pods/Pai)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
## Requirements
**iOS 9** or later## Installation
### [CocoaPods](https://cocoapods.org/)
To integrate Pai using CocoaPods, add the following to your Podfile:
````ruby
pod 'Pai'
````
### [Carthage](https://cocoapods.org/)
To integrate Pai using Carthage, add the following to your Cartfile:
````ruby
github 'lkmfz/Pai'
````
Run `carthage update` to build the framework and drag the built `Ubud.framework` into your Xcode project.## Usage
### PaiCalendarDataSource
```swift
// MARK: - PaiCalendarDataSourcefunc calendarDateEvents(in calendar: MonthCollectionView) -> [PaiDateEvent] {
return events
}
```### PaiCalendarDelegate
```swift
// MARK: - PaiCalendarDelegatefunc calendarDateDidSelect(in calendar: MonthCollectionView, at index: Int, date: PaiDate) {
/// Do anything on selected date.
}
func calendarMonthViewDidScroll(in calendar: MonthCollectionView, at index: Int, month: String, year: String) {
/// Do anything scrolling the monthly view and changing the top month content.
}
```## License
Pai is released under the [MIT License](https://github.com/lkmfz/Pai/blob/master/LICENSE.md).