Create iOS Calendar app in Swift with CalendarKit (Full Tutorial)

preview_player
Показать описание
This is a full CalendarKit tutorial where we'll build an app similar to the default iOS Calendar. It will display the events stored on the iPhone local calendar. Then we'll add event creation and editing support to our calendar application. We'll make it possible to edit the beginning and the end of the event by dragging it, as in the default iOS calendar app. To edit events by filling in a form we'll be using a framework called EventKitUI in addition to EventKit and CalendarKit.

Get the sample code for this app:

CalendarKit:

EventKit:
EventKitUI:

Subscribe and ring the bell to not miss next tutorials and iOS-related content. Have a suggestion? Leave it in the comments.

Watch two parts of this tutorial separately:
Part 1: Create iOS Calendar app in Swift with CalendarKit
Part 2: Editing events: iOS Calendar app in Swift with CalendarKit

Follow Richard on social media:

CalendarKit is a Swift calendar UI library for iOS, iPadOS and Mac Catalyst. It looks similar to the Apple Calendar app out-of-the-box, while allowing customization when needed. CalendarKit is composed of multiple modules which can be used together or independently.

Timecodes:
0:00 Intro
0:34 Create an Xcode project
1:34 Configure Xcode project
5:17 Testing our configuration
6:28 Installing CalendarKit
9:05 EventKit
10:22 Requesting calendar access
13:28 Adding events to the calendar
14:05 Displaying events in CalendarKit
15:04 Fetching events from the EventStore
18:30 Converting events to CalendarKit's format
22:23 Getting notified for event changes
25:29 1st milestone & explanation
26:22 Reacting to event selection
28:34 Adding a custom data model
36:35 Event detail view
41:15 How editing works in CalendarKit
47:28 Activating edit mode
51:28 Saving changes to the Event Store
54:50 Exiting edit mode
55:46 Creating new events
1:00:53 Showing a form for new events
1:07:34 Final result & explanation
1:08:11 Conclusion
Рекомендации по теме
Комментарии
Автор

I really would like to build a calednar app but didn't know what I needed to have learned before watching this. It would have been nice if you mentioned at the beginning of the video who this video was for. Whether you're a swift beginner or experienced in code. I watched this without knowing a single line of code and realized that this video isn't good for me.

davesuccess
Автор

Thanks a lot mate! Really helpful and super explicative!

bobbynwm
Автор

Hello Richard!
my ckEvent of type Event() doesn't have the same properties that appear in your
video at 19:42, any idea why?
the only properties available are id, name and date

stefanarosca
Автор

Hi Richard, just one quick question.
I haven't seen the full tutorial but i'm just wondering if this calendar is independent to the calendar of my phone or the events are linked? I mean, if you create an event on your app it will be created on the phone calendar?
Maybe is a dumb question but i want to know this before i start to follow the tutorial
If somebody else knows the answer please tell me, is going to be really helpful for me
btw, amazing job!!

kevinmorabuitrago
Автор

Hi, thank u for awesome tutorial, it was I big work, some text to support u!! :)

egornesterenko
Автор

Hi, richard!
Very good library. I am using this for my app for appointment booking. But problem is we also developing android app. I can't find like this library.
If you know anything in Android please let me know. I am stuck from last two months.
Thanks again for such good work.

mustaqeezahmad
Автор

Does your kit have options for Month and Week view?

dariapavlovskaya
Автор

Hi Richard, I'm having a problem with the implementation of the calendar, the documentation says that CalendarKit is similar to the off-the-shelf Apple Calendar app, but allows you to customize it if needed. I want to implement some of the functionality of the calendar in my application. In the video you show the preview of the day. But I did not find the implementation of viewing the month and year. How can I contact you I have questions for you?)

gusbr
Автор

Richard would you mind sharing another part on how to handle calendar invites with invitees and response options ( accept, decline, maybe )? Thanks

bobbynwm
Автор

Top of screen black screen is coming, Please solve this issue

Idea_Motivational
Автор

Very nice tutorial and framework. I would like to expand the API so that Events from different calendars are presented on individual columns instead of all crowded in 1 column. Which class would I manipulate to get this functionality? I would probably expand the data source API to organize the data into an array of arrays, where each sub- array contain the events for a particular calendar.

ezathashim
Автор

Hey Richard I was wondering how you would map the dateInterval. When I am watching this video it looks lik ekEvent does not have startDate or endDate, but just has date interval.

michaelespineli
Автор

FIrst, love the framework. However, I would ask that you start with a simple example that uses the ViewController in a new Xcode project and just add a few static events. Then as an advanced tutorial do one where you get rid of the storyboard and get events from your calendar. I think most of us would use this as a secondary viewcontroller, not the main one when you launch that app. Again LOVE the framework!

DanKardell
Автор

How to initiate it with a custom date rather than today's date.

atmaramsawant
Автор

is CalendarKit supports Weekly View? I only see Day View in this example and on my research

francislegaspi
Автор

And please also mention can I force user not add event if there is already event in cell. For iOS.

mustaqeezahmad
Автор

Hey. I really like the framework, but is there any way we can implement the calendar with all the days of the month, or is it just for the week?

john-markiliev
Автор

Is it possible to show limited hours for a specific day e.g if day == "TUE" show hours 1-5 only

Umairkhan-qlid
Автор

How can we customize the calendar cell

kavindudissanayake
Автор

Good

Can you make little fast

Thanks

mdaslamknl
visit shbcf.ru