是否不可能获得完成块成功然后从另一种方法接收数据?
@property myCompletion;
// I have first call listeners, i can't add this in to "createOrderWithsuccess"
-(void)listeners {
[[SocketIOManager sharedInstance].socket on:@"someAction" callback:^(NSArray* data, SocketAckEmitter* ack) {
// data received
myCompletion(data);
}];
}
// this will be called <del>first</del> later
- (void)createOrderWithsuccess:^(NSArray *data) {
// but it has to wait then data will be received
myCompletion = success;
}