Swift 4 – Substring!
let stripped = "FREMP my string" // my string let indexOf = stripped.index(stripped.startIndex,offsetBy:5) let sub = stripped //left cut -> output: "my string" print("sub") //sub is of type substring -…
Swift 4 – Array Contains Value
Easiest way: let’s say you have an array let check = c.sections.contains { $0.idaudits_sections == needle } // check returns true if a match is found. $0 is the iterator,…
Swift 4 – Add Action Menu to TableviewController
override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> ? { let deleteAction = UITableViewRowAction(style: UITableViewRowActionStyle.default, title: "Löschen" , handler: { (action:UITableViewRowAction, indexPath: IndexPath) -> Void in let deleteMenu =…