Post

Replies

Boosts

Views

Activity

Reply to Picker without NavigationView
Here what I've figured out: If a picker is inside a Form, it's going to be frozen and not selectable Form { Picker("Choose a number", selection: $selection) { ForEach(0 ..< data.count, id: \.self) { index in Text(data[index]) } } } If I wrap this form in a NavigationView, it's going to work perfectly. NavigationView { Form { Picker("Choose a number", selection: $selection) { ForEach(0 ..< data.count, id: \.self) { index in Text(data[index]) } } } However for my current design, I can't have a NavigationView on this View. Is there a solution for that ? Thx
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’21
Reply to Call 2o API after finishing 1st one
I dont want to do differently. But when I do this way, self.callApi2(id) doesnt wait for self.callApi1 to finish. self.callApi2(id) is triggered at the same time and because doesnt have an ID yet, it fails. var id = self.callApi1() self.callApi2(id)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’21
Reply to Picker without NavigationView
Found a solution. Replace the form with ScrollView instead of NavigationView and the picker will work :)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Picker without NavigationView
Here what I've figured out: If a picker is inside a Form, it's going to be frozen and not selectable Form { Picker("Choose a number", selection: $selection) { ForEach(0 ..< data.count, id: \.self) { index in Text(data[index]) } } } If I wrap this form in a NavigationView, it's going to work perfectly. NavigationView { Form { Picker("Choose a number", selection: $selection) { ForEach(0 ..< data.count, id: \.self) { index in Text(data[index]) } } } However for my current design, I can't have a NavigationView on this View. Is there a solution for that ? Thx
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Call 2o API after finishing 1st one
I dont want to do differently. But when I do this way, self.callApi2(id) doesnt wait for self.callApi1 to finish. self.callApi2(id) is triggered at the same time and because doesnt have an ID yet, it fails. var id = self.callApi1() self.callApi2(id)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Loading View on API call
If I do this way I will have "Argument passed to call that takes no arguments" I also tried: store.getHomeItems() { () -> in This is the signature for the method: func getHomeItems() { ... }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21