In my application, when the user add an object, can also add a link for this object and then the link can be opened in a webView.
I tried to save a link without http:// prefix, then open it in the webView but that can't open it!
Before webView starts loading, is there a method to check if the URL saved has got http:// prefix? And if it hasn't got it, how can I add the prefix to the URL?
Thanks!
相关问题
- Angular RxJS mergeMap types
- Core Data lightweight migration crashes after App
- React Native Inline style for multiple Text in sin
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
相关文章
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- How to get rid of border around and image used as
- Swift - hide pickerView after value selected
- Is a unicode user agent legal inside an HTTP heade
First, you should create a new category for NSURL: File > New File > Objective-C Category. You can call the category something along the lines of HTTPURLWithString, make it a category of NSURL, press next and add it to your target. Then in the NSURL+HTTPURLFromString.m implement the following message (and declare the message in your .h)
To open a link in the WebView is simply