Declarative UIKit for iOS apps
DHDeclarable
views are programatic UIKit
, so start with a breakpoint
DHDeclarable
helper properties such as .declaredWithRedLines
UIView
, you can add .declaredWithRedLines
to see where the view is being drawn.hierarchy
to inspect view hierarchies
DHDVStack(distribution: .fill, spacing: 10).add([
DHDLabel("This is a header"),
DHDSeparator(),
UIButton().declaredWith { button in
// use `button` to set titles, etc
}.centerHorizontally,
DHDSpacer(),
])
po testStack.recursiveDescription().asNSString
StackView (0) [
[0] Label (This is a header)
[1] separator
StackView (2) [
[0] spacer
[1] Button (TestButton)
[2] spacer
]
[3] spacer
]
UIStackView
, so if a view is not added to a stack view, it will not be shown in the debug outputDHDeclarable
in the next article: Examples, or view the map.