Skip to content

Comment on Apple's API's Are Awful (At Least Some of Them)

Comments

Also a current funny bug with SwiftUI, if you left out a “dot”, it will compile but crashes the app during runtime.

VStack { } navigationDestination(isPresented: $goToSettings) { }

There should be a dot before navigationDestination and this should not compile ever.

That's not a bug. It's just calling `self.navigationDestination(isPresented:)`, which is a valid thing that exists. The same thing can happen anywhere that you're calling a method on an object which also exists on `self`.

It crashes the app on runtime.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.