I have 2 methods to be executed on a button click event say method1:
and method2:
.Both have network calls and so cannot be sure which one will finish first.
I have to execute another method methodFinish
after completion both method1: and method2:
-(void)doSomething
{
[method1:a];
[method2:b];
//after both finish have to execute
[methodFinish]
}
How can I achieve this other than the typical start method1:-> completed -> start method2: ->completed-> start methodFinish
Read about blocks..I am very new to blocks.Can anybody help me with writing one for this?And any explanation will be very helpful.Thank you