Skip to content

Commit c37a7eb

Browse files
committed
Improve documentation
1 parent 42c9c71 commit c37a7eb

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ final class ViewController: UIViewController {
7676
$0.isLayoutMarginsRelativeArrangement = true
7777
$0.clipsToBounds = true
7878
}
79-
UIStackView(axis: .vertical).ibSubviews { superview in
79+
UIStackView(axis: .vertical).ibSubviews {
8080
for item in profileItems {
8181
RowView().ibAttributes {
8282
$0.titleLabel.text = item.title
@@ -144,4 +144,14 @@ import SwiftUI
144144
}
145145
```
146146

147-
![](IBFreeFormPreview.gif)
147+
![](IBFreeFormPreview.gif)
148+
149+
## 📖 Documentation
150+
- ibSubviews - Define the hierarchy of views, similar to Interface Builder's Document Outline. When applied to a UIStackView, the DSL uses the `addArrangedSubview` method
151+
- ibAttributes - Configure attributes and constraints of a view. This corresponds to Interface Builder’s Identity, Attributes, Size, and Connections Inspectors.
152+
153+
⚠️ When defining a constraint, either the first or second item must be the same view to which you are applying ibAttributes.
154+
155+
- ibApply - Similar to ibAttributes, but without a @resultBuilder for constraints — useful for custom configurations, it works with NSObject and UIView
156+
- IBFreeForm - Wraps a UIView, UIViewController, or even a SwiftUI.View, allowing resizing in the simulator. You can also define a snapFrame to display frames of specific devices (e.g., iPhone SE).
157+
- IBDebug - Provides showColors, showFrames to help visualize layout frames during debugging. Works only with UIKit.

0 commit comments

Comments
 (0)