You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create a carousel like view with horizontal scrolling using a CollectionView but it seems that the axes parameter on initializer is ignored. Any ideas?
import SwiftUI
import SwiftUIX
struct Model: Identifiable {
var id: UUID = UUID()
var name: String
}
struct ContentView: View {
@State var animated: Bool = false
@State var text: String = "test"
var sections = (1...5).map { Model(name: String($0)) }
var data = (1...99).map { Model(name: String($0)) }
var body: some View {
CollectionView(.horizontal, sections, id: \.id) { section in
Section {
ForEach(data) { item in
Text(item.name)
}
}
}
}
}
The text was updated successfully, but these errors were encountered:
I want to create a carousel like view with horizontal scrolling using a CollectionView but it seems that the axes parameter on initializer is ignored. Any ideas?
The text was updated successfully, but these errors were encountered: