Modal Views | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/15234721-your-second-ios-and-swiftui-app/lessons/10

Hi Jessy, Loving your updated 2nd iOS app tutorial.
I am having a problem with building after lesson 10. In DetailView the line PHPickerViewController.View(image: $image) complains that type PHPickerViewController has no member ‘View’. I compared my code to your Final code

Sorry. This got sent unintentionally. The first sentence still holds.
My problem was that I didn’t notice I had to get your PHPickerViewController.View.swift file.
All is well…

2 Likes

In the video I see this kind of code that doesn’t work.

NavigationLink(
destination: DetailView(libro: libro, image: $image)
)

I have to remove the $ to image like this and the code go…
NavigationLink(
destination: DetailView(libro: libro, image: image)
)

When I selected Library() in ContentView for refactoring, the whole refactoring pane was grayed out, and I couldn’t select Extract to Variable.
Why did this happen, and what can I do to resolve the issue?

5:48

I can’t extract to variable

“Disabled”