Unresolved identifier NavigationButton error
NavigationLink
replace NavigationButton
, The code below is update for WWDC 2019 Introducing SwiftUI: Building Your First App
struct RoomCell: View {
let room: Room
var body: some View {
NavigationLink(destination: RoomDetail(room: room)) {
Image(room.thumbnailName)
.cornerRadius(8)
VStack(alignment: .leading) {
Text(room.name)
Text("\(room.capacity) people")
.font(.subheadline)
.foregroundColor(.secondary)
}
}
}
}
NavigationButton
changed to NavigationLink
for a while now. So replace it and use it.