0xLet / SwiftUIKit

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

Ability to update set padding #137

Closed 0xLeif closed 4 years ago

0xLeif commented 4 years ago

Related to #119

Setting

let view = UIView { someView } // view.padding == 0

Updating

view.update(padding: 16) // view.padding == 16
// or
view.update(padding: [.leading(8), .top(16)])
0xLeif commented 4 years ago

Similar implementation as #119

https://github.com/0xLeif/SwiftUIKit/blob/cc8a3d3d62d9ae85315cafbe25634e83dd767a06/Sources/SwiftUIKit/Extensions/UIView%2BSwiftUIKit.swift#L279-L293