This repo is to demonstrate when a parent UIViewRepresentable is dismissed, its child view still get re-rendered.
- Run app, console should print
1 appear
- Tap
To Normal
1 appear
is printed on console, although we expect not to print anything as the parent view has been replaced by another view- If we comment out
super.viewDidAppear
(line 18 of UIHostingView.swift) orsuper.viewWillDisappear
(line 24 of UIHostingView.swift), the message1 appear
will not be printed. However not callingsuper
may cause other unwanted issues.