質問編集履歴

1

ソースコード訂正

2023/10/23 23:31

投稿

RAKUDA
RAKUDA

スコア10

test CHANGED
File without changes
test CHANGED
@@ -73,13 +73,7 @@
73
73
  GeometryReader { geometry in
74
74
  let width = geometry.size.width
75
75
  let itemWidth = width / CGFloat(numItem)
76
- Button {
76
+
77
- if let rand = items.randomElement() {
78
- positioningItem = rand.item
79
- }
80
- } label: {
81
- Text("rand")
82
- }
83
77
  ScrollViewReader { proxy in
84
78
  ScrollView(.horizontal, showsIndicators: false) {
85
79
  LazyHStack(alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/, spacing: 0) {