My code:
if let url = NSURL(string: \"www.google.com\") {
let safariViewController = SFSafariViewController(URL: url)
safariViewController.view.tintColor
You can check for availability of http in your url
string before creating NSUrl
object.
Put following code before your code and it will solve your problem (you can check for https
also in same way)
var strUrl : String = "www.google.com"
if strUrl.lowercaseString.hasPrefix("http://")==false{
strUrl = "http://".stringByAppendingString(strUrl)
}