pointfreeco / episode-code-samples

💾 Point-Free episode code.
https://www.pointfree.co
MIT License
973 stars 294 forks source link

Apply deprecation of NavigationView #135

Closed pereBohigas closed 1 year ago

pereBohigas commented 1 year ago

Hi!

Thank you so much for sharing your code and for the interesting videos. I've already started watching them and I'm getting exited about your composable architecture.

On Xcode Version 14.2 in Playground NavigationView is being rendered as split view. This behavior doesn't seem that is going to be fixed, since in the next version of the different Apple OSs (iOS 16.4, iPadOS 16.4, macOS 13.3, Mac Catalyst 16.4, tvOS 16.4 and watchOS 9.4) NavigationView will be deprecated.

exercise_split_view

In order to replace the appearance of the exercises shown in the videos, I replaced here the usages of NavigationView with NavigationStack.

mbrandonw commented 1 year ago

Hi @pereBohigas, we're reluctant to take this PR because all of those episodes were built for iPhones and not iPads, and so it mostly works as you expect from watching the episodes. And we are also worried about potential problems with NavigationStack and NavigationLink, e.g. NavigationLink.init(isActive:) does not play nicely with stacks. So this may subtly break some past episode code samples.

pereBohigas commented 1 year ago

It's fine for me. I'm just wondering why they in Xcode 14.2 look like as if being displayed on an iPad (that's to say on a split screen), which doesn't match with what is shown in the videos.

Thank you very much for your work