I have a custom function updated for Swift 2.1 that uses the UIAlertController to simulate the Toast function in Android.
func showToast(withMessage message:String) { let menu = UIAlertController(title: nil, message: nil, preferredStyle: .ActionSheet) let cancel = UIAlertAction(title: message, style: .Cancel, handler: nil) menu.addAction(cancel) self.presentViewController(menu, animated: true, completion: nil) let delay = 1.5 * Double(NSEC_PER_SEC) let time = dispatch_time(DISPATCH_TIME_NOW, Int64(delay)) self.tableView.setEditing(false, animated: true) dispatch_after(time, dispatch_get_main_queue()) { () -> Void in self.dismissViewControllerAnimated(true, completion: nil) } }
It features a complete working solution for the OP.
source share