Re:Apple's auto layout and visual format language for JavaSc...
by jchb on Thursday January 09, 2020 @10:42AM
(#22002070)
> Does anyone honestly think this: [ 'H:|[view1(==view2)]-10-[view2]|' 'V:|[view1,view2]|' ] is readable?
This is not Auto layout, it is just an alternative string-based API to express constraints in Auto layout. In practice no-one (that I know) uses Visual Format Language, as it is called, but instead sets up constraints in code or in Xcode Interface builder. In Swift code it would look something like this: view1.leadingAnchor.constraint(equalTo: view2.leadingAnchor, constant: 10) view2.topAnchor.constraint(equalTo: view1.bottomAnchor) ...
Re:Apple's auto layout and visual format language for JavaSc...
by crazygringo on Thursday January 09, 2020 @10:37AM
(#22002018)
I mean, it doesn't look any less readable than CSS.
Maybe CSS is syntactically easier, but the relationships between elements are much more hidden (width: 100%; of what?) so I'd call it a wash.
Re:Apple's auto layout and visual format language for JavaSc...
by Someone1234 on Thursday January 09, 2020 @11:20AM
(#22002428)
You don't think CSS grid[0] is more usable than that? Templates are basically a ASCII-visible representation of the layout.
[0] https://css-tricks.com/snippets/css/complete-guide-grid/
Especially since Apple admitted their mistake and is moving towards SwiftUI.