0xLet / SwiftUIKit

📱 UIKit code that is fun to write
https://0xlet.github.io/SwiftUIKit/
MIT License
74 stars 6 forks source link

Add modifier for ContentHuggingPriority #159

Closed 0xLeif closed 4 years ago

0xLeif commented 4 years ago

Currenty you must use the configure method

Label("Hello World").configure {
    $0.setContentHuggingPriority(.defaultHigh, for: .vertical)
}

Expected

Label("Hello World")
    .setVertical(huggingPriority: .defaultHigh)

Also Expected

Label("Hello World")
    .setVertical(huggingPriority: .defaultHigh)
    .setHorizontal(huggingPriority: . defaultLow)
    .setVertical(compressionResistancePriority: .defaultLow)
    .setHorizontal(compressionResistancePriority: .defaultHigh)