I have HTML string which is created using an xml file by a third party library. The HTML string contains custom URLs for images and videos (Ex:image://). Is there is way by I can handle these resource load request and load them correctly in UIWebView?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Do all browsers on iOS use WKWebview or UIWebVIew?
- Can not export audiofiles via “open in:” from Voic
You should be able to change them to a file:// url that points to a file inside the application bundle.
To get the path you can use:
Note that you will need to escape this using:
We need to create a subclass of NSURLProtocol and re-implement the following methods that can handle the custom URL scheme
We also have to register this custom URL protocol class when the app launches in the following way