Updating UILabel from UIAlertAction handler not working in Swift 4
问题 I have a subclass of UITableView in my iOS app (Swift 4, XCode 9). This table has one row and I want it to display an alert when it's clicked, get some input from the user, and then update a label ( lblUserFromPrefs ) in the table when the user clicks "OK" in the alert. Currently everything works fine except the label doesn't get updated. Here is the relevant code from my UITableView subclass: override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { print(