Cacao icon indicating copy to clipboard operation
Cacao copied to clipboard

Implement autolayout

Open MFAshby opened this issue 6 years ago • 7 comments

Autolayout makes layouts for different screen sizes a breeze. I think it would be a great addition to the project.

It looks like some efforts have already been made to port or wrap the cassowary constraint solver to swift, see https://github.com/FormidableLabs/Phaedo

A similar effort has been made in this project, but wrapping to objective-j, and it has worked quite well https://github.com/cacaodev/cappuccino

Sent from my Google Nexus 6P using FastHub

MFAshby avatar Aug 02 '17 10:08 MFAshby

See discussion #swift on overconstrained.slack.com

Sent from my Google Nexus 6P using FastHub

MFAshby avatar Aug 02 '17 11:08 MFAshby

And then there's https://github.com/hfossli/amoeba/tree/swift?files=1

hfossli avatar Aug 02 '17 14:08 hfossli

We need a Pure Swift AutoLayout implementation. The C++ library https://github.com/FormidableLabs/Phaedo is not viable since ObjC is not available on Linux and non-Darwin platforms.

https://github.com/starwing/amoeba Might be a viable solution (for starting), but would need a Swift wrapper. Im open to any PRs.

colemancda avatar Nov 18 '17 02:11 colemancda

I have written a swift wrapper around amoeba. See my link. I’m sure Starwing is fine with merging that swift wrapper and adding a package.swift

hfossli avatar Nov 18 '17 14:11 hfossli

I’m open to any license on my part (do what you want)

hfossli avatar Nov 18 '17 14:11 hfossli

Here also a list of various implementations in various languages http://overconstrained.io/

hfossli avatar Nov 18 '17 16:11 hfossli

Someone would have to write an NSAutoLayout API wrapper on top of this lib. Again, I'm open to any PRs.

colemancda avatar Nov 18 '17 16:11 colemancda