I want to use UIWebview in different view controllers,but i don’t want these view controller to reload the web page, in another way, I want a UIWebview to load the page once,and used it anywhere.
SO I want to create a web view and load the webpage in a singleton way.
My question is : is this possible or appropriate?
Thanks a lot.
I want to use UIWebview in different view controllers,but i don’t want these view
Share
What’s type of your html to present ? Is it static HTML content or dynamic URL source?
For static HTML content
I suggest you to create prefer HTML file and load them directly.
For dynamic HTML content base on your URL source
When you have loaded the data in the first request , you can store them with NSData that can be the properties in your singleton class. Of course, you can call them any where, any ViewController to get your data and load them in your UIWebview with once connection.
hope it helps you !