Post

Replies

Boosts

Views

Activity

Reply to SwiftUI 4 navigation bug on iOS 16?
This one will work: You need to use NavigationLink with an activation parameter so that you can track the start of navigation. When switching the navigation link activation parameter, force the keyboard to be removed extension UIApplication: UIGestureRecognizerDelegate { func dismissKeyboard() { sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) } } Button {     UIApplication.shared.dismissKeyboard()     activateLink = true } label: { Text("Activate link") } .background( NavigationLink(destination: DestinationView(), isActive: $activateLink) { EmptyView()} ) In iOS 15, there are no such problems.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’22
Reply to SwiftUI Navigation link issue
The problem is that you have NavigationLink placed in the ForEach cycle! You need to remove NavigationLink from the cycle and transfer the necessary data there, for example, through the view model. Summary: you must have only one NavigationLink with the "IsActive" parameter. My original answer - https://stackoverflow.com/questions/66017531/swiftui-navigationlink-bug-swiftui-encountered-an-issue-when-pushing-anavigatio/67626758#67626758
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to SwiftUI 4 navigation bug on iOS 16?
This one will work: You need to use NavigationLink with an activation parameter so that you can track the start of navigation. When switching the navigation link activation parameter, force the keyboard to be removed extension UIApplication: UIGestureRecognizerDelegate { func dismissKeyboard() { sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) } } Button {     UIApplication.shared.dismissKeyboard()     activateLink = true } label: { Text("Activate link") } .background( NavigationLink(destination: DestinationView(), isActive: $activateLink) { EmptyView()} ) In iOS 15, there are no such problems.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to SwiftUI List Separator within NavigationView Problem
You don't need to use a specific .plaint style, but you need to apply ANY (whatever you want) style to the list and then everything will be ok.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to SwiftUI Navigation link issue
The problem is that you have NavigationLink placed in the ForEach cycle! You need to remove NavigationLink from the cycle and transfer the necessary data there, for example, through the view model. Summary: you must have only one NavigationLink with the "IsActive" parameter. My original answer - https://stackoverflow.com/questions/66017531/swiftui-navigationlink-bug-swiftui-encountered-an-issue-when-pushing-anavigatio/67626758#67626758
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21