0

How do I load a View with a View name? For example, I have a struct TextPage: View , how do I load this View via the string TextPage ?

1
  • are you trying to load the TextPage view as the root view of the app or are you trying to push it onto a navigation stack? Commented Jun 7, 2019 at 16:01

1 Answer 1

0

You can use a UIHostingController

UIHostingController(rootView: TextPage())
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.