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.
精彩评论