Would it be possible to parse the anchor out from the url and then once
the page is completely loaded in the webview use javascript's
window.location to jump to the anchor's location within the page. I know
that can work for UIWebView, not 100% sure for WKWebView.
> On Jan 21, 2016, at 7:17
> On Jan 21, 2016, at 6:23 PM, Jeff Evans wrote:
>
> //The full url appears to have the anchor prepended, plus a couple of
> dashes:
>
> #page3-- [pathtobook is here]/book/chapter1.html
The .description property of a URL assembled with -relativeToURL is
Thanks -
Here's what I'm doing: Assume a directory called book and a file called
chapter1, and an anchor called #page3
NSString *filePath = [[NSBundle mainBundle] pathForResource: chapter1
ofType: @"html" inDirectory: book];
//That file path gets converted to a
On Jan 21, 2016, at 7:17 PM, Jeff Evans wrote:
>
> Colleagues,
>
> In OSX I'm using an NSURLRequest to load a file url in WKWebView. Works
> fine unless I try to add an anchor to the path, for example,
>
> [path]/filename.html#anchorname
The most correct way would
Colleagues,
In OSX I'm using an NSURLRequest to load a file url in WKWebView. Works
fine unless I try to add an anchor to the path, for example,
[path]/filename.html#anchorname
The problem appears to be that the # gets escaped to %23.
I tried [NSURL URLWithString: anchorname
On Jan 21, 2016, at 17:17 , Jeff Evans wrote:
>
> In OSX I'm using an NSURLRequest to load a file url in WKWebView. Works
> fine unless I try to add an anchor to the path, for example,
>
> [path]/filename.html#anchorname
>
> The problem appears to be that the # gets