Oh, BTW — to the person who named their layout engine the "struts and springs" algorithm, I openly invite you to just Google for that name.
Maybe next time you'll learn how to name your algorithms better. I mean, I get it; it's descriptive. But, it's utterly unsearchable.
(Every time I search, I get a metric shit-ton of automotive sites and Youtube videos, and nothing at all of layout-related content, even with the aid of qualifiers like -ford -car -racing -chevy
... etc.)
@vertigo Wow, that's particularly bad! I got something with the query:
springs and struts "layout engine" iOS
This query will inevitably stop working, so my results:
https://whackylabs.com/swift/layout/2022/11/27/intro-simple-layout-engine/
https://doi.org/10.1007/978-1-4302-4600-8_2
https://theswiftdev.com/ios-auto-layout-tutorial-programmatically/
https://en.wikipedia.org/wiki/Layout_engine
https://news.ycombinator.com/item?id=19025361
I also found https://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.html, which is neat (cc @alcinnz) but completely unrelated to the topic at hand.
@wizzwizz4 @alcinnz Thanks! Although, I'm looking for the actual algorithm itself, and not iOS-specific code. But this should at least help cut through the automotive spam.
@vertigo Are you looking for:
https://sites.cc.gatech.edu/gvu/people/Phd/Ian/swing-doc/doc/springs_struts.html
? If so, the source code for this library is available. Per https://kidneybone.com/c2/wiki/SpringsAndStruts, anything from JDK 1.4 will do (and I expect earlier versions to have simpler code).
@wizzwizz4 Bookmarked -- thank you! This is pretty much exactly what I'm looking for. Thanks again!