I have an IOS project with html files shown in webview. These html files have different sections that correspond to the fragments (for example, index.html # section1, index.html # section2) that I would like to upload to webview. Unfortunately, use [NSURL fileURLWithPath:url]does not work with fragments. #converts to %23in url and file not found. If I use a method [NSURL URLWithString:url], it works, but this method cannot load local resources.
Is there a way for a webview to load a local resource url using a snippet?
source
share