You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,12 +165,13 @@ import GetLaid
165
165
The generic function `addForAutoLayout` adds a subview and prepares it for AutoLayout. It returns the subview it takes as its exact type. Use this function to add subviews:
166
166
167
167
~~~swift
168
-
classList: NSView {
169
-
overrideinit(frameframeRect: NSRect) {
170
-
super.init(frame: frameRect)
171
-
header.constrainToParentExcludingBottom()
168
+
classList: UIView {
169
+
// ... other code, including call to addSubviews() ...
170
+
171
+
funcaddSubviews() {
172
+
addForAutoLayout(header) >> allButBottom // add header to the top
172
173
}
173
-
privatelazyvarheader =addForAutoLayout(Header()) // of type Header
0 commit comments