2

I am working on a simple SWIFT app which loads a single page app from local file. When the app is launching, I use this code:

self.webView!.loadHTMLString("<html><body>1</body></html>", baseURL:"http://www.ft.com")

It works fine and the page is displayed. But when I later trigger another code in the same view:

self.webView!.loadHTMLString("<html><body>2</body></html>", baseURL:"http://www.ft.com")

The page doesn't change at all. I checked Apple's official guide but it is very vague. Could anyone explain how loadHTMLString in more detail?

Oliver Zhang
  • 499
  • 6
  • 16

0 Answers0