Adding Native ad to a tableView - RedTroops/IOS-SDK GitHub Wiki

In the method

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

add the following

 if(indexPath.row==2)
    {
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
        RTAdView *adView = [[RTAdView alloc] initWithSize:RTAdNative6to1];
        adView.frame = CGRectMake(0,0,300,50);
        [cell addSubview:adView];
        [cell bringSubviewToFront:adView];
        [adView prepareAd];
        [adView loadRequest:[RTAdRequest request]];
        return cell;
    }

######Notes

  1. if(indexPath.row==2) : can be changed to any row you like to.
  2. Keep in mind the limitations of the Native ads.