Created
November 20, 2019 09:42
-
-
Save mikru1688/8af6455b9b62e96de2fe25065b8708fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView: View { | |
var programmingBooks: [ProgrammingBook] = [] | |
var body: some View { | |
NavigationView { | |
List(programmingBooks) { programmingBook in | |
NavigationLink(destination: DetailView(name: programmingBook.name, content: programmingBook.content, imageName: programmingBook.imageName)) { | |
Image(programmingBook.imageName) | |
.clipShape(Circle()) | |
VStack(alignment: .leading) { | |
Text(programmingBook.name) | |
.font(.title) | |
Text(programmingBook.publisher) | |
.font(.subheadline) | |
.foregroundColor(Color.gray) | |
} | |
} | |
} | |
.navigationBarTitle(Text("ProgrammingBooks")) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment