Advertisement
Xaniasty

Untitled

May 24th, 2024
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. struct PhotoGridView_Previews: PreviewProvider {
  2. static var previews: some View {
  3. PhotoGridView().environmentObject(RecipeData())
  4. }
  5. }
  6.  
  7. import SwiftUI
  8.  
  9. struct RecipeDetailView: View {
  10. var recipe: Recipe
  11.  
  12. var body: some View {
  13. VStack {
  14. Image(recipe.filename)
  15. .resizable()
  16. .aspectRatio(contentMode: .fit)
  17. .frame(height: 200)
  18.  
  19. Text(recipe.name)
  20. .font(.title)
  21. .padding()
  22.  
  23. Text(recipe.description)
  24. .font(.body)
  25. .padding()
  26. }
  27. .navigationTitle(recipe.name)
  28. }
  29. }
  30.  
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement