0

I have this response from json text:"<p>Lorem ipsum</p><p><img src="url/some-image"></p>[[youtube]]<p>Here is youtube url show as embed</p>[[twitter]]<p>Same as youtube</p><p>Lorem ipsum</p>"

How I can show that in my App, like on web? Can I do that with SwiftUI? What I need to do?

1 Answer 1

1

Create a UIWebView() and connect it as an outlet. By doing this, it should load your HTML code directly on your Swift page. Hope this helps!

myWebView.loadHTMLString("<p>Lorem ipsum</p><p></p>[[youtube]]<p>Here is youtube url show as embed</p>[[twitter]]<p>Same as youtube</p><p>Lorem ipsum</p>", baseURL: nil)
Sign up to request clarification or add additional context in comments.

2 Comments

You can try what they say in this forum as reference forums.developer.apple.com/thread/117348
@AvivFrenkel Thanks for the addition.

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.