waitUntilAllTasksAreFinished error Swift

前端 未结 4 1483
抹茶落季
抹茶落季 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:50

    I was also having same issue, got resolved by taking reference from above answer. Thank you @Nate

    var storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
    var vc: UINavigationController = storyBoard.instantiateViewControllerWithIdentifier("AppViewController") as! UINavigationController
    
    NSOperationQueue.mainQueue().addOperationWithBlock {
        self.presentViewController(vc, animated: true, completion: nil)
    }
    

提交回复
热议问题