开发者

EXC_BAD_ACCESS in protocol?

I am getting EXC_BAD_ACCESS at the following line, what can be possbile reason, can any one explain

   开发者_C百科 if([self.delegate respondsToSelector:@selector(dealInfo:imageDidDownload:indexPath:)])//Here is EXC_BAD_ACCESS

    [self.delegate dealInfo:self imageDidDownload:thumbImage indexPath:self.indexPath];

I have done deal.delegate=self;, and deal is declared in delegate method of UITableView

      cellForRowAtIndexPath

something like below

    DealInfo *deal = [nearByDeals objectAtIndex:(section - 1)];
    deal.delegate = self;
    deal.indexPath = indexPath;

HELP!


EXC_BAD_ACCESS usually means you're trying to access a released object. In this case, delegate is probably released before you call respondsToSelector: on it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜