-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yoga Swift interface #620
Comments
Any news here? |
No @alickbass, but in the meantime, you can use it: https://github.com/layoutBox/FlexLayout |
At this point FlexLayout has grown to be its own mature project. I think it is more likely that we should point to it in Yoga documentation instead of bringing into the repo. |
Hey all, I started prototyping out an implementation in a standalone package at iainsmith/YogaSwift that uses Swift Macros to minimise the boilerplate code for wrapping the calls to The next thing I am looking at is updating the gentest script to generate the swift tests. If there’s interest in upstreaming some of this work into the main yoga Swift package, down the line, I’d be happy to move this to a new module in my yoga fork and PR it up. The upcoming release of swift 6 has support for noncopyable generics & type (~Copyable) which facilitate building a more ergonomic Swift API, so users don’t have to manually call YGNodeFree, which is what my current implementation is targetting. |
Report
Issues and Steps to Reproduce
This is not an issue, but more a proposition.
YogaKit should have an official Swift interface, and not just a Objective-C interface. Swift has been around for more than 3 years now, and it is now the defacto iOS languages for new applications.
I've developed a nice Swift Yoga interface (at least from my point of view :-)) that gently wraps the Yoga flexbox implementation. I would be really happy to share it and integrate it with the Yoga's repo. You can find my project at https://github.com/lucdion/FlexLayout
Regards
Link to Code
https://github.com/lucdion/FlexLayout
The text was updated successfully, but these errors were encountered: