- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
int row = [indexPath row];
GADBannerView *bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeSmartBannerPortrait];
bannerView_.adUnitID = @"ca-app-pub-xxxxxxx/xxxxxxx";
bannerView_.rootViewController = self;
static NSString * CellIndentifier = @"Cell";
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:CellIndentifier forIndexPath:indexPath];
if ((row % kFrequencyAdsInCells) == (kFrequencyAdsInCells - 1)) {
cell = [tableView dequeueReusableCellWithIdentifier:CellIndentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIndentifier];
}
if (!bannerView_.superview) {
[bannerView_ loadRequest:[GADRequest request]];
}
[cell.contentView addSubview:bannerView_];
}
NSManagedObject * Agro = [propriety objectAtIndex:indexPath.row];
[cell.textLabel setText:[Agro valueForKey:@"namePropriety"]];
return cell;
}