mamaral / Neon

A powerful Swift programmatic UI layout framework.
MIT License
4.58k stars 389 forks source link

Use Intrinsic Size When Anchoring #67

Open MatrixSenpai opened 6 years ago

MatrixSenpai commented 6 years ago

Most elements (like UILabel) have an intrinsicContentSize. Is it possible to extend Neon to use this automatically?

valentinradu commented 6 years ago

But it already does that. Just use AutoWidth or AutoHeight for the views that have an intrinsic size. E.g.: imageView.anchorToEdge(.top, padding: 20, width: AutoWidth, height: AutoHeight)