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 - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -