Charts: embrace SwiftUI for a new framework?

Created on 10 Jun 2019  路  4Comments  路  Source: danielgindi/Charts

I just came across a video Building Custom Views with SwiftUI

The demo looks really powerful with the drawingGroup() API to render tremendous shapes simultaneously in metal, and a much easier yet powerful interface to draw shapes comparing to CoreGraphics with great effects and animations, and performance -which seems our pain point.

I'm opening a discussion here that maybe we could start thinking about transforming this library to a SwiftUI backed framework? Though it requires iOS13, but we could make a sibling framework, and eventually end this library in far future.

@jjatie @petester42 @danielgindi

Most helpful comment

If it鈥檚 a new framework it doesn鈥檛 need to be compatible with charts. Swift only is fine. If people want objc they can use charts

All 4 comments

This is unfeasible unless we drop objective-c support. It would also mean only supporting the latest OS for each platform.

I don't know if SwiftUI can be run in objc projects, if not, I guess eventually we will move to SwiftUI for a new one?

It can, but you need to wrap everything in UIKit/AppKit wrappers and expose it to objective-c. Given Apple is making Swift only frameworks now (SwiftUI, RealityKit, and Combine), it seems silly to try and expose SwiftUI based stuff to objective-c just for fun. It's purely a way to ease migration to SwiftUI.

If it鈥檚 a new framework it doesn鈥檛 need to be compatible with charts. Swift only is fine. If people want objc they can use charts

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cilasgimenez picture cilasgimenez  路  4Comments

Bharati555 picture Bharati555  路  4Comments

ahmedsafadii picture ahmedsafadii  路  3Comments

Aungbandlab picture Aungbandlab  路  4Comments

anhltse03448 picture anhltse03448  路  3Comments