What is the best-practice for placing ads in your table view cells? Here's my code, which works until the banner receives the transitionToNextBanner event, which then crashes my app.
UITableViewCell *cell = [tableVw dequeueReusableCellWithIdentifier:@"BannerAdCellIdentifier"];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"BannerAdCellIdentifier"] autorelease];
}
[[cell viewWithTag:9999] removeFromSuperview];
ADBannerView *adView = [[ADBannerView alloc] initWithFrame:CGRectMake(0, 0, 320, 50)];
adView.tag = 9999;
adView.requiredContentSizeIdentifiers = [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];
adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
[cell addSubview:adView];
[adView release];
return cell;
I thought since I'm not setting the ad's delegate that this would be safe from any memory-related issues.