All Projects → willard1218 → WLAppleCalendar

willard1218 / WLAppleCalendar

Licence: MIT License
Make AppleCalendar using JTAppleCalendar library.🎉

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to WLAppleCalendar

Jtapplecalendar
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable
Stars: ✭ 7,091 (+20755.88%)
Mutual labels:  calendar, jtapplecalendar
Photoshop-Javascript-Tools
Utility scripts to speed up daily photoshopping and automate annoying tasks
Stars: ✭ 35 (+2.94%)
Mutual labels:  calendar
networkdays
Networkdays functions ... including `networkdays` excel like function with no dependencies (no NumPy)
Stars: ✭ 22 (-35.29%)
Mutual labels:  calendar
astro
自用天文算法,公历农历转换、八大行星位置、日出日落月出月落时间、节气物候时间等
Stars: ✭ 33 (-2.94%)
Mutual labels:  calendar
nativescript-calendar
📅 NativeScript plugin to Create, Delete and Find Events in the native Calendar
Stars: ✭ 44 (+29.41%)
Mutual labels:  calendar
components
Easily develop emails with email-ready components.
Stars: ✭ 18 (-47.06%)
Mutual labels:  calendar
persian-date-time
Persian Date Time
Stars: ✭ 54 (+58.82%)
Mutual labels:  calendar
react-native-infinite-calendar
WIP: React native port of react-infinite-calendar
Stars: ✭ 43 (+26.47%)
Mutual labels:  calendar
google-calendar-api
Demo Project for Google Calendar API Using Spring Boot Rest API with OAuth2
Stars: ✭ 25 (-26.47%)
Mutual labels:  calendar
Klendario
A Swift wrapper over the EventKit framework
Stars: ✭ 44 (+29.41%)
Mutual labels:  calendar
bhitte-patro
Google Calendar for Nepali Date
Stars: ✭ 25 (-26.47%)
Mutual labels:  calendar
vue-calendar
基于vue和moment开发的时间组件
Stars: ✭ 25 (-26.47%)
Mutual labels:  calendar
vuejs3-datepicker
vue 3 datepicker. supports disabling, highlighting of dates and programmatic access of date.
Stars: ✭ 23 (-32.35%)
Mutual labels:  calendar
isoweek
Go package for calculating a start date and time of ISO 8601 week. (golang)
Stars: ✭ 32 (-5.88%)
Mutual labels:  calendar
wepy-com-calendar
一个基于wepy的日历组件,内置多套皮肤,可启用打卡功能
Stars: ✭ 33 (-2.94%)
Mutual labels:  calendar
node-google-calendar
Simple node module that supports Google Calendar API
Stars: ✭ 76 (+123.53%)
Mutual labels:  calendar
holidata
Holidata is the core of holidata.net, a no-nonsense, ad-free provider of international holiday data.
Stars: ✭ 27 (-20.59%)
Mutual labels:  calendar
ios-permissions-service
An easy way to do permissions requests & handling automatically.
Stars: ✭ 25 (-26.47%)
Mutual labels:  calendar
finql
A quantitative finance toolbox
Stars: ✭ 21 (-38.24%)
Mutual labels:  calendar
WeekToDoWeb
WeekToDo is a free minimalist weekly planner app focused on privacy. Schedule your tasks and projects with to do lists and a calendar. Available for Windows, Mac, Linux or online.
Stars: ✭ 48 (+41.18%)
Mutual labels:  calendar

WLAppleCalendar

這行事曆是仿照 Apple 內建的行事曆做的

使用 JTAppleCalendar library,特色是 UI 可以自己客製化。

下方的行程細節是額外加的,資料是由 Schedule 產生隨機的假資料。

過程中遇到最大的困難就是行事曆動態高度的部分,
當有些月份在行事曆上有五週(2017/11);有些月份則有六週(2017/12)
所以當五週要滑到六週時,下面的行程表要往下縮;反之,要往上升。

但此套件提供的動態高度的方式[1]如下:

動態的是每一行的高度,而不是整個行事曆的高度。
整個行事曆是 CollectionView
裡面每一格都是 CollectionViewCell
套件提供的只有 CollectionViewCell 的高度是動態,
CollectionView 的高度無法動態。

所以我固定了行事曆的高度,
新建一個高度為 1 的 View,貼在行事曆下方,
將此 Viewconstraint 拉到程式裡 (separatorViewTopConstraint),
然後用個方法[2]來知道現在月份是 5 個 row 還是 6 個 row。
如果是 5 個 row,constraintconstant 就是一個 cell 的高度的負數;
反之,constant 就變回 0,這樣就可以達到行事曆動態高度,但 cell 的高度固定了。

註:

  1. 設定時,選擇 tillEndOfRow 就會有動態的 cell 高度 (6x7 or 5x7);
    選擇 tillEndOfGrid 就會固定給 6x7 的高度。
  2. 此行事曆進入一個月份會給你三個 array,分別是 inDates/monthDates/outDates。 monthDates 就是在行事曆上,且是這個月份的日期;
    inDates 就是在行事曆上,且是上個月份的日期;
    outDates 就是在行事曆上,且是下個月份的日期;
    所以方法就是用 tillEndOfGrid 選項來固定高度,就會每次都產生 outDates,
    再判斷 outDates.count < 7,如果成立就是有 6 rows。
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].