Learn Courses My Dashboard

iOS Foundation M4L15 Wrap Up Challenge

Hello!

Could you check the BookContent view in your solution(Module 4 Final Challenge)? For me it is not working properly.
When I try to switch tab it is crashing. After I try it again the page number starts with 2 and now I can switch one page but when I try to switch to page 3 it crashes again.

See pictures:

After switch to page 2 it crashes and goes back to Staging view when I click Read Now again I see this:

It is still the first page with page 2 index.
Now I can switch to page 2 but not to page 3.

Hint:
In iPad simulators it works. Only iPhone simulators have this bug.
I use Xcode 13.1 and test with iOS 15.0.

Thanks in advance

Do you mean it crashes and the Simulator displays the device home screen or do you mean the App crashes back to the Home View where the list of books is shown?

No, not the simulator. The App crashes back to its previous view which is the staging view of the book.

Have you added the modifier .navigationViewStyle(.stack) to the closing brace of the NavigationView in your BookListView (or whatever you have called your initial view)?