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

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

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -