Post

Replies

Boosts

Views

Activity

How to add DetailView?
Hi everyone, does anyone have a suggestion on how I can add a detail view to this grid view? import SwiftUI struct ContentView: View {     var body: some View {         NavigationView {             List {                 ImageRow()             }.navigationBarTitle(Text("Landscapes"))         }     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView()     } } import SwiftUI import Combine struct ImageRow: View {     var body: some View {         var images: [[Int]] = [] _ = (1...18).publisher .collect(2) // Creating two columns             .collect()             .sink(receiveValue: { images = $0 })                  return ForEach(0..<images.count, id: \.self) { array in             HStack {                 ForEach(images[array], id: \.self) { number in                     Image("noaa\(number)")                         .resizable()                         .scaledToFit()                         .cornerRadius(10)                   }             }         }     } }
2
0
727
Apr ’22
NavigationLink issue
Good day, I have the problem that when I switch from one view to another, the content is moved to the bottom every time. I have already tried with the: See picture attached: [https://we.tl/t-SUYZZh6M2P) Does anyone have a solution suggestion? Greetings
4
0
761
Dec ’21