我收到错误“init(destination:isActive:label:)”已在iOS 16.0中弃用:在导航堆栈或导航拆分视图中使用导航链接(值:标签:)
.background(
NavigationLink(destination: DetailLoadingView(coin: $selectedCoin), isActive: $showDetailView, label: {
EmptyView()
})
)
1条答案
按热度按时间20jt8wwn1#
变更:
NavigationView{}
至NavigationStack{}
NavigationLink(){}
至NavigationDestination
示例: