Post

Replies

Boosts

Views

Activity

building lists
OS: 10.15.2Xcode: 11.3 (11C29)Lesson: Building Lists & NavigationSection 6 - List & DetailMy code:import SwiftUIstruct LandmarkList: View { var body: some View { NavigationView { List(landmarkData) { landmark in NavigationLink(destination: LandmarkDetail()){ LandmarkRow(landmark: landmark) } .navigationBarTitle(Text("Landmarks")) }}struct LandmarkList_Previews: PreviewProvider { static var previews: some View { LandmarkList() }}}}var body line returns error: 'Function declares an opaque return type, but has no return statements in its body from which to infer an underlying type"Next line - NavigationView { gives a yellow warning claiming the Result of 'NavigationView<Content>' initializer is unusedI think I have copied this perfectly from the lesson. Did the new XCode change something? If I've missed something please help me spot it - and if there is any additional explanation, I need to learn!Thanks!!
3
0
505
Dec ’19