File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -125,16 +125,15 @@ extension UIKitBackend {
125125 let view = widget. view
126126
127127 // Use bounds if non-zero, otherwise fallback to screen size
128- let width = view. bounds. width > 0 ? view. bounds. width : UIScreen . main. bounds. width
129- let height = view. bounds. height > 0 ? view. bounds. height : UIScreen . main. bounds. height
128+ let width = view? . bounds. width > 0 ? view. bounds. width : UIScreen . main. bounds. width
129+ let height = view? . bounds. height > 0 ? view. bounds. height : UIScreen . main. bounds. height
130130
131131 return SIMD2 ( Int ( width. rounded ( . awayFromZero) ) , Int ( height. rounded ( . awayFromZero) ) )
132132 }
133133
134-
135134 public func setSize( of widget: Widget , to size: SIMD2 < Int > ) {
136- widget. width = 1000
137- widget. height = 1000
135+ widget. width = size . x
136+ widget. height = size . y
138137 }
139138
140139 public func createScrollContainer( for child: Widget ) -> Widget {
You can’t perform that action at this time.
0 commit comments