Category Archives : swift 3/4

Home  >>  swift 3/4

Convert String to NSURL is return nil in swift 3/4 – Solution

4
May,2018

0

let url : NSString = “url string here” let urlStr : NSString = url.addingPercentEscapes(using: String.Encoding.utf8.rawValue)! as NSString let actualURL : NSURL = NSURL(string: urlStr as String)! print(actualURL)

IOS Swift 3/4 show alert for specific time duration

1
Mar,2018

0

   let alert = UIAlertController(title: “”, message: “alert disappears after 30 seconds”, preferredStyle: .alert)             self.present(alert, animated: true, completion: nil)             // change to desired number of seconds (in this case3…