over 5 years ago
The code below will help you in declaration of completion handler and how to call the completion handler in swift.
To declare a completion handler in swift use the line : typealias completionHander = (sucess: Bool)->Void
//decalration of completion handler typealias completionHander = (sucess: Bool)->Void // definition of method with completion handler func mycallingFucntion(senderValue: Int, mycompletion:completionHander)->Void { print("value in function \(senderValue)") if senderValue > 10 { mycompletion(sucess: false); } else { mycompletion(sucess: true) } } //calling of completion handler mycallingFucntion(100) { (sucess) -> Void in print("\(sucess)") }
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)