How can I open a calendar from Swift app (when pressing a button for example)? Or is there a way to embed a calendar in a view controller in the app? I want to avoid using external calendars programmed by others. Thanks!
You can open the Calendar app by using the url scheme calshow://
:
Swift 3+
guard let url = URL(string: "calshow://") else { return }
UIApplication.shared.open(url, options: [:], completionHandler: nil)
Swift 2 and below
UIApplication.sharedApplication().openURL(NSURL(string: "calshow://")!)
With EventKit, you can implement your self a calendar. You should read Calendar and Reminders Programming Guide from Apple site.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With