Implementich "Back" action

Discussion in 'iOS Programming' started by lawicko, Oct 8, 2008.

  1. lawicko macrumors member

    Joined:
    Jul 17, 2008
    #1
    Ok, so I use UIWebView to browse web content from my application. I don't use built in loadURL method, because I have to authenticate and handle errors, so UIWebView's loading system is not good enough. I load the content I use this method:
    – loadData:MIMEType:textEncodingName:baseURL:
    but unfortunately when using this method the web view does not record the clicks, so it does not know when back and forward actions are available...
    I was thinking of keeping track of visited urls and clicks manually, but that kind of solution may take more time than necessary, so maybe someone can give me some advice how to implement back action in this case?
     
  2. xnakx macrumors newbie

    Joined:
    Oct 5, 2008
    #2
    check out the instance methods in the WebView documentation. It might work in your situation.
    here
     
  3. lawicko thread starter macrumors member

    Joined:
    Jul 17, 2008
    #3
    As stated in my first post - UIWebView instance is not aware of next and previous requests when loading content manually. I had to implement this functionality myself by storing every request in an array, creating request history and removing appropriate records when moving back. Wasn't as much work as I feared it would be :D
     

Share This Page