**Setup:**

`MainViewController` holds an `NSMutableArray` of objects. An object is an instance of my `NewContact` which has a `firstName` and a `contactImage` ivar. When I tap on `showAllContactsBtn` in `MainViewController` `AllContactsViewController` should show all object ivars (`firstNames` and `contactImages`) on the table.

I think the problem is that I do not pass the data properly to `AllContactsViewController` but can't figure out how to fix it. Worth to mention is that I do not see the `NSLog` statements in `cellForRowAtIndex` so maybe the method will not be called at all?

**MainViewController.m**

```
- (IBAction)showAllCBtnTapped:(id)sender
{
    AllContactsViewController *nAllCVC = [[AllContactsViewController alloc]init];
    nAllCVC.allContactsArray = self.contactsArray; // Properly passed the data???
    nAllCVC.delegate = self;
    nAllCVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

    [self presentModalViewController:nAllCVC animated:YES];
}

```

**AllContactsViewController.h**

```
@interface AllContactsViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>

```

**AllContactsViewController.m**

```
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *cellIdent = @"ContactCell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdent];

    if (cell == nil) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdent];
    }

    NewContact *tempContact = [[NewContact alloc]init];

    tempContact = [self.allContactsArray objectAtIndex:[indexPath row]];

    cell.textLabel.text = tempContact.firstName;

    NSLog(@"%@", tempContact.firstName);
    NSLog(@"Test......");

    cell.imageView.image = tempContact.contactPicture;

    [tableView reloadData];

    return cell;
}

```

**Note:**

As you can see `AllContactsViewController` was subclassed from `UIVIewController`, is this fine or do I have to subclass from `UITableViewController` despite I set the delegate and datasource properly?