-
Notifications
You must be signed in to change notification settings - Fork 0
/
ContentView.swift
32 lines (31 loc) · 957 Bytes
/
ContentView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import Subsonic
import SwiftUI
struct ContentView: View {
let names = ["Goku", "Gohan", "Vegeta", "Piccolo"]
let colums=[
GridItem(.adaptive(minimum: 250))
]
var body: some View {
NavigationView{
ScrollView{
LazyVGrid(columns: colums)
{
ForEach(names, id: \.self) {name in
Button{
play(sound: "\(name).m4r")
print("You tapped on \(name)")
} label:{
Image(name)
.resizable()
.scaledToFit()
.cornerRadius(25)
.padding(.horizontal)
}
}
}
}
.navigationTitle("DBZ Legends")
}
.navigationViewStyle(.stack)
}
}