One Quickie


Preparing for Segue from a UITableView tap (UITableView->Swift)
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    guard let selectedRow = self.tableView.indexPathForSelectedRow else { return }
    guard let vc = segue.destination as? InfographicViewController else { return }
    
    let counter = counters[selectedRow.row]
    let stats = counter.currentTextStats
    vc.stats = stats
}



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com