waitUntilAllTasksAreFinished error Swift

前端 未结 4 1547
抹茶落季
抹茶落季 2021-01-31 16:23

I have this call in my loginViewController when Submit button is pressed:

let http = HTTPHelper()
    http.post(\"http://someUrl.com/Login/userEmail/\\(username.         


        
4条回答
  •  没有蜡笔的小新
    2021-01-31 16:58

    I was having this issue when trying to change the contents of a text box from inside an Async Task.

    The solution was using the DispatchQueue (Xcode 8.0 and Swift 3.0):

        DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
           self.textBox.text = "Some Value"
           }
    

提交回复
热议问题