Michael Long
1 min readNov 14, 2019

--

I thought I’d explained most of it in the article. You setup the environment so that your settings are visible to items created lower in the view tree.

That’s not just environment objects, but accent colors, fonts, display styles, and more. Having to reset them when presenting new view is indeed inconvenient and for that matter, wasteful of resources. Why? Because the objects already in the tree above that point will persist. They’re not going anywhere.

So the settings and objects have already been defined and instantiated, and yet now we have to do it all over again.

That’s why I deemed it inconvenient and — for that matter — a bug.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

Responses (1)