i have app users can navigate pile of locally stored html files. have uiwebview
, configured correctly uiwebviewdelegate
. usually, when user follows link, shouldstartloadwithrequest
called, followed webviewdidfinishload
bit later.
but, if link pointing anchor on same page 1 displayed, shouldstartloadwithrequest
called. webviewdidfinishload
not fire.
in sense, see might expected behaviour, because in-page navigation should not require page reload. however, need place hook call stack after in-page navigation complete. optimal solution let me know when sort of navigation has ended, both page, in-page , forward/backward actions.
my best hackaround far has been call performselector: withobject: afterdelay:
@ end of shouldstartloadwithrequest
method, i'm not happy this.
does know how can solve correctly? insight appreciated!
you can try use nsurlconnectiondatadelegate
, allows handle incoming data. maybe can determine if page loaded manually adding sign html files.
nsurlconnectiondatadelegate reference
edit: gist.github.com/buranmert/7304047 wrote piece of code , worked, may not way wanted work maybe helps. every time user clicks url anchor, creates connection , connection finishes loading web view loads data, marks point web view finished loading page. use local html files, not think creating connections create problems
Comments
Post a Comment