richardtop / CalendarKit

📅 Calendar for Apple platforms in Swift
https://www.youtube.com/watch?v=cJ63-_z1qg8
MIT License
2.49k stars 334 forks source link

SwiftUi support #270

Open dkikimov opened 3 years ago

dkikimov commented 3 years ago

Issue Description

Hello! Thank u for amazing job and such a good library. I wanted to ask if you can do a SwiftUi View and write e ReadMe instruction. It's gonna be really cool!

richardtop commented 3 years ago

Hi Thanks for the question. SwiftUI support is planned.

dkikimov commented 3 years ago

Hello again. I just wanted to ask if there will be such an opportunity soon cause I just need to choose uikit or swiftui

richardtop commented 3 years ago

Go with UIKit when working with CalendarKit. You can code the rest of your app in SwiftUI.

richardtop commented 3 years ago

I keep the issue open as the SwiftUI for CalendarKit is still planned to be implemented.

richardtop commented 3 years ago

https://stackoverflow.com/questions/64432749/can-i-use-view-controller-calendarkit-in-swiftui-application

niklasgrewe commented 2 years ago

@richardtop any news about SwiftUI support?

richardtop commented 2 years ago

Hi, please refer to the link I've posted and develop the code to bind CalendarKit with SwiftUI and then wrap it into SwiftUI view. More SwiftUI support is coming soon.

niklasgrewe commented 2 years ago

@richardtop

More SwiftUI support is coming soon.

cool, does that mean, that Calendarkit supports SwiftUI native in future, so i can build multiplatform apps (iOS, macOS) only with SwiftUI and without Catalyst?

richardtop commented 2 years ago

The goal so far is to have iOS & iPadOS support only, but have the component fully controlled by the SwiftUI layer. Having native (i.e. AppKit) mac support would require first implementing that support in the library, before even being able to expose it to the SwiftUI layer.

So the simplest way to support SwiftUI as of right now, is to port it to iOS/iPadOS.

Is there anything you need require AppKit support specifically?

grosch commented 2 years ago

Any updates on the native SwiftUI support, as opposed to wrapping in a UIKit host?

eborras14 commented 2 years ago

Any updates on the native SwiftUI support, as opposed to wrapping in a UIKit host?

Harry-KNIGHT commented 4 months ago

Hello, any updates on the native SwiftUI support, as opposed to wrapping in a UIKit host @richardtop ?

richardtop commented 4 months ago

If you're interested, would you be willing to create a wrapper for the CalendarKit and contribute? As for now, the recommended way to integrate CalendarKit into a SwiftUI application is to connect your DataSource & Delegate in the UIKit domain and expose the resulting controller to the SwiftUI as mentioned in the StackOverflow post: https://stackoverflow.com/questions/64432749/can-i-use-view-controller-calendarkit-in-swiftui-application