Use Closure in Declaration to a Method (Objective-C) -


i want use closure in declaration method. code can written in swift this.

func request(whatever: string,               success: ((anyobject) -> void)?,               failure: ((nserror) -> void)?) -> someclass {          //codes method. } 

how can use closures in method gets id or nserror objects , returns nothing in objective-c?


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

android - MPAndroidChart - How to add Annotations or images to the chart -