Actually I have two related questions here, about different use cases of loading requests in a UIWebView
.
- Is it safe to call -
[UIWebView loadRequest:]
on a web view that is inserted in the view hierarchy and its hidden property or the one of its superview is set to YES? - Is it safe to call -
[UIWebView loadRequest:]
on a web view that is not inserted in the view hierarchy?
In particular I'm interested whether it is considered to be a good practice to load request in a UIWebView
that is not visible, and whether the delegate assigned to the instance of UIWebView
will be notified once the request succeeds/fails. The reason I'm asking is that UIWebView
class reference says "create a UIWebView
object, attach it to a window, and send it a request to load web content", where the part telling that a UIWebView
should be attached to a window makes me doubt if the above approaches are reliable.