After updating Xcode to version 16 for iOS 18, I noticed severe performance issues, especially with SwiftUI previews. In addition, there seems to be an increase in bugs in my app, with one major issue being that NavigationLink no longer works as expected. I use NavigationLink in my toolbar to navigate to a settings view, but it fails to trigger navigation now.
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
ToolBarLeftIcon()
.onTapGesture {
dismiss()
}
}
ToolbarItem(placement: .principal) {
Spacer()
}
ToolbarItem(placement: .navigationBarTrailing) {
NavigationLink(destination: SettingsView()) {
Image(systemName: "gear")
.foregroundStyle(.appPrimary)
}
}
}
I expected the app to navigate to the SettingsView when tapping the gear icon in the toolbar. The NavigationLink displayed the icon but did not trigger any navigation when tapped. Additionally, after the iOS 18 update, SwiftUI previews became very slow, and there were more unexpected bugs in the app.
Günseli Ünsal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2