[英]ASIHTTPRequest Delegate Methods not being called
場景:
ViewControllerA.m以ViewControllerB.m作為委托來設置ASIHTTPRequest,將其傳遞到ServerIO.m以啟動ASIHTTPRequest,然后ViewControllerA將視圖控制器推送到ViewControllerB。
但是,未調用委托方法。 這是代碼:
ViewControllerA.m
ViewControllerB *drc = [[ViewControllerB alloc] initWithRequestID:requestID];
[self.navigationController pushViewController:drc animated:YES];
[ServerIO findRooms:[NSDictionary dictionaryWithObjectsAndKeys:drc, @"delegateController", nil]];`
服務器IO
[request setDelegate:[parameters objectForKey:@"delegateController"]]; //I checked the delegate here and it's valid.
我已經在ViewControllerB.m中添加了,但是在那里沒有調用委托方法。 有任何想法嗎?
要回答我自己的問題:
您必須使用實例方法(-),而不是類方法(+)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.