How to run synchronically two functions with async operations on iOS using Swift
问题 lets propose this scenario a method with async network operations func asyncMethodA() -> String? { result : String? Alamofire.manager.request(.POST, "https://www.apiweb.com/apimethod", parameters: parameters, encoding:.JSON) .response { (request, response, rawdata, error) in if (response?.statusCode == 200) { //DO SOME HEAVY LIFTING } } return result //string } another method with async network operations func asyncMethodB() -> String? { result : String? Alamofire.manager.request(.POST,