@@ -86,27 +86,27 @@ struct AdaptiveGrid: Layout {
8686 switch count {
8787 case 1 :
8888 let ratio = aspectForSingle ( subviews: subviews)
89- place ( 0 , x: 0 , y: 0 , w : width, h : width / ratio)
89+ place ( 0 , x: 0 , y: 0 , width : width, height : width / ratio)
9090
9191 case 2 :
9292 let cellW = ( width - spacing) / 2
93- place ( 0 , x: 0 , y: 0 , w : cellW, h : height)
94- place ( 1 , x: cellW + spacing, y: 0 , w : cellW, h : height)
93+ place ( 0 , x: 0 , y: 0 , width : cellW, height : height)
94+ place ( 1 , x: cellW + spacing, y: 0 , width : cellW, height : height)
9595
9696 case 3 :
9797 let halfW = ( width - spacing) / 2
9898 let rightH = ( height - spacing) / 2
99- place ( 0 , x: 0 , y: 0 , w : halfW, h : height)
100- place ( 1 , x: halfW + spacing, y: 0 , w : halfW, h : rightH)
101- place ( 2 , x: halfW + spacing, y: rightH + spacing, w : halfW, h : rightH)
99+ place ( 0 , x: 0 , y: 0 , width : halfW, height : height)
100+ place ( 1 , x: halfW + spacing, y: 0 , width : halfW, height : rightH)
101+ place ( 2 , x: halfW + spacing, y: rightH + spacing, width : halfW, height : rightH)
102102
103103 case 4 :
104104 let cellW = ( width - spacing) / 2
105105 let cellH = ( height - spacing) / 2
106- place ( 0 , x: 0 , y: 0 , w : cellW, h : cellH)
107- place ( 1 , x: cellW + spacing, y: 0 , w : cellW, h : cellH)
108- place ( 2 , x: 0 , y: cellH + spacing, w : cellW, h : cellH)
109- place ( 3 , x: cellW + spacing, y: cellH + spacing, w : cellW, h : cellH)
106+ place ( 0 , x: 0 , y: 0 , width : cellW, height : cellH)
107+ place ( 1 , x: cellW + spacing, y: 0 , width : cellW, height : cellH)
108+ place ( 2 , x: 0 , y: cellH + spacing, width : cellW, height : cellH)
109+ place ( 3 , x: cellW + spacing, y: cellH + spacing, width : cellW, height : cellH)
110110
111111 default :
112112 let cols = min ( maxColumns, 3 )
@@ -120,7 +120,7 @@ struct AdaptiveGrid: Layout {
120120 for r in 0 ..< fullRows {
121121 for c in 0 ..< cols {
122122 let x = CGFloat ( c) * ( columnWidth + spacing)
123- place ( idx, x: x, y: y, w : columnWidth, h : columnWidth)
123+ place ( idx, x: x, y: y, width : columnWidth, height : columnWidth)
124124 idx += 1
125125 }
126126 y += columnWidth
@@ -131,7 +131,7 @@ struct AdaptiveGrid: Layout {
131131 let tailW = ( width - CGFloat( rem - 1 ) * spacing) / CGFloat( rem)
132132 for c in 0 ..< rem {
133133 let x = CGFloat ( c) * ( tailW + spacing)
134- place ( idx, x: x, y: y, w : tailW, h : columnWidth)
134+ place ( idx, x: x, y: y, width : tailW, height : columnWidth)
135135 idx += 1
136136 }
137137 }
0 commit comments