Xcode 9 update Swift, purple warning
问题 Not sure why after updating to Xcode 9 my project (originally created in Swift 3) is showing purple warnings: UITextField.text must be used from main thread only I'm only checking in If statement if text field is empty... attaching screenshot. 回答1: The login manager is running your closure on a thread other than the main thread and you can't use user interface elements off the main thread. Others have said that it's OK just to read UI properties on side threads and they are probably right,