Asynchronous Callback functions: Iphone Versus Android
<p>On Callback</p>

<p>On Iphone </p>

<h2>File A:</h2>

<p>@protocol servicedelegate 
-(void)taskCompleted:(NSDcitionary*) dict;
@end</p>

<p>-(void) performtask
callback=@"taskCompleted:";</p>

<p>[(id)delegate performSelector:NSSelectorFromString(callback) withObject:data];</p>

<h2>File B:</h2>

<p>-(void) taskcompleted:(NSDictionary*)dict
{</p>

<p>//don something when File A fisnihed the taskcompleted and have the data
// this callback on File B will be awaken from File A's delegate function
}</p>

<p><em><strong>The question How does Android implement the above, File A waiting to getting the data, and nobody knows how long, but once finished, File B would awaken by the delegate callback fucntion of taskcompleted.</em></strong></p>
