Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct PhotoGridView_Previews: PreviewProvider {
- static var previews: some View {
- PhotoGridView().environmentObject(RecipeData())
- }
- }
- import SwiftUI
- struct RecipeDetailView: View {
- var recipe: Recipe
- var body: some View {
- VStack {
- Image(recipe.filename)
- .resizable()
- .aspectRatio(contentMode: .fit)
- .frame(height: 200)
- Text(recipe.name)
- .font(.title)
- .padding()
- Text(recipe.description)
- .font(.body)
- .padding()
- }
- .navigationTitle(recipe.name)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement