Just tested both codes (wrees3 and PaulSolt) on my iPad Air (2020) iOS 14.6, Playground App 3.4.1 (1302.34)
Both code don't work by default. But if I turn off "Enable Results" they both work perfect with no changes in code.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: