Post not yet marked as solved
Hello forum!
I have a grid in my app
I want to display 1 column if the user's device is iPhone
or 2 columns if the device is an iPad
How can I do that from SwiftUI?
Could you help me? thankS
Post not yet marked as solved
Hello,
Is it possible triggers a function instead a view on the tab item?
This is a standard:
TabView {
		Text("The First Tab")
				.tabItem {
						Image(systemName: "1.square.fill")
						Text("First")
				}
		Text("Another Tab")
				.tabItem {
						Image(systemName: "2.square.fill")
						Text("Second")
				}
		Text("The Last Tab")
				.tabItem {
						Image(systemName: "3.square.fill")
						Text("Third")
				}
}
.font(.headline)
Is it possible this? :
TabView {
		Text("The First Tab")
				.tabItem {
						Image(systemName: "1.square.fill")
						Text("First")
				}
		Text("Another Tab")
				.tabItem {
						Image(systemName: "2.square.fill")
						Text("Second")
				}
		someFunction() 👈
				.tabItem {
						Image(systemName: "3.square.fill")
						Text("Third")
				}
}
.font(.headline)
Can you help me?
Thanks!
L