# UITableView

## Scenario

* Insert ad into UITableView when user is scrolling it.

## Ad Formats Supported

* CE CARD
* CE NATIVE

## How to Integrate

1. Use `CECardAD` for easy integration with CE CARD.
2. Use `CENativeAd` for easy integration with CE NATIVE.
3. Use `CETableViewADHelper` by following the instructions below:

### Import Required Files

Add the following files to your project:

```
CETableViewADHelper.h
CETableViewADHelper.m
CEStreamPlacementADHelper.h
CEStreamPlacementADHelper.m
CEStreamTagADHelper.h
CEStreamTagADHelper.m
CEStreamADHelper.h
CEStreamADHelper.m
I2WAPI+Deprecated.h
CEAdView.h
CEAdInvocation.h
CEAdInvocation.m
```

### Create `CETableViewADHelper` in `[UIViewController viewDidLoad]`.

In `[UIViewController viewDidLoad]`, set up your `CETableViewADHelper`:

* Create a `CETableViewADHelper` instance and bind it with your `UITableView` instance.
* Set delegate and data source to your `UITableView` instance through our category methods.
* Start loading ads by invoking `[CETableViewADHelper loadAd]`.

```
// create helper instance
self.helper = [CETableViewADHelper helperWithTableView:self.tableview viewController:self placement:@"STREAM"];

// start loading ads
[self.helper loadAd];
```
