haojianzong / ObjectForm

A simple yet powerful Swift library to build form for your class models.
Apache License 2.0
177 stars 14 forks source link

[Prototype] DO NOT MERGE: Move BaseRow to protocol #18

Open haojianzong opened 2 years ago

haojianzong commented 2 years ago

Make this PR to play with new Apple APIs.

Using Swift 5.7 new features, we now can migrate BaseRow from a base class to protocol with any keywords.

image

Please build this branch with Xcode 14 beta, because building with Xcode 13 will generate this error because it is new swift feature:

image
haojianzong commented 2 years ago

3 WWDC sessions:

What's new in swift generics Embrace Swift Generics

Screen Shot 2022-07-05 at 11 21 26 Screen Shot 2022-07-05 at 11 21 50 Screen Shot 2022-07-05 at 11 22 39

Design protocol interfaces in Swift: type eraser, type relationships

Screen Shot 2022-07-05 at 13 51 15