Displaying Content in a Web View IPHONE APPS

If your user interface includes a UIWebView object, you can display local content or content that is loaded from the network. When loading local content, you can either create the content dynamically or load it from a file and display it using the loadData: MIMEType: text Encoding Name: baseURL: or load HTML String: baseURL: method. To load content from the network, you create an NS URL Request object and pass it to the loadRequest: method of your web view.

If, after initiating a network-based load request, you must release your web view for any reason, you must cancel the pending request before releasing the web view. You can cancel a load request using the web view’s stopLoading method. A typical place to include this code would be in the view Will Disappear: method of the owning view controller. To determine if a request is still pending, you can check the value in the web view’s loading property.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status