Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It sounds like you want to have more fine-tuned control over the navigation between webpages in your app, and the standard back/forward functionality won't do.</p> <p>I recommend simplifying matters by completely ignoring the built-in <code>goBack</code> and <code>goForward</code> functionality in the <code>UIWebView</code>, and have your buttons delegate to a "StateManager" type object - where based on the current state of the application and which direction the user is trying to go, you know which state should result (ie: which page to load). </p> <p>To load the new state, just use <code>[_webView loadRequest:request]</code> (or one of the other load functions - see below), where <code>request</code> represents the new state. </p> <p>I don't see how <code>_requestURL</code> is being used in your code above, but calling <code>[_webView reload]</code> will just load the last page that was loaded via one of the UIWebView load functions (ie: <a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/occ/instm/UIWebView/loadData%3aMIMEType%3atextEncodingName%3abaseURL%3a" rel="nofollow"><code>loadData</code></a>, <a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/occ/instm/UIWebView/loadHTMLString%3abaseURL%3a" rel="nofollow"><code>loadHTMLString</code></a>, or <a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/occ/instm/UIWebView/loadRequest%3a" rel="nofollow"><code>loadRequest</code></a>), or whatever the last page navigated to afterwards was (either through clicking links or navigating back/forward).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload