title: UIWebView with NavigationBar
body: <p>Imagine there is a list of posts and if you click a postItem, then a detailed post view shows up. For example,</p>
  
  <p><strong>/index</strong></p>
  
  <p><code>[post1, post2, post3 ...]</code></p>
  
  <p>post1 is clicked</p>
  
  <p><strong>/posts/1</strong></p>
  
  <p><code>Hello! I am a post!</code></p>
  
  <p>Also, the website that will be included inside the UIWebView is a single page web app, which makes things a little tricky. Since the webapp <em>renders</em> parts instead of <code>redirecting</code>, navigation doesn't necessarily make another web request. For regular websites that make a new url request for every navigation, I can use either <code>webViewDidStartLoad</code> or <code>shouldStartLoadWithRequest</code>, having one ViewController per webpage. A naive solution for my case would be forcing a fresh redirect for every navigation, using <code>window.location = url</code>.</p>
  
  <p>However, that loses the performance boost coming from rendering specific parts. A better way to do it is attaching a navigationItem such as <code>title</code> and <code>back button</code> dynamically when the user moves away from the index page. The problem is, <strong>how do I detect whether the user moved to /posts/1 from /index if I am not doing a full redirect?</strong></p>
  
  <p>Thank you so much in advance!</p>