Plusieurs UITableViews sur un UIView

J'ai besoin d'avoir deux UITableViews sur une UIView. Je peux le faire fonctionner avec un, voici le code:

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {

    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return [contentOne count];  //sets row count to number of items in array
}

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

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
    }

    NSString *firstValue = [[NSString alloc] initWithFormat: @"Row %i% %", indexPath.row+1 ];
    NSString *secondValue = [contentOne objectAtIndex:indexPath.row];

    NSString *cellValue = [firstValue stringByAppendingString: secondValue]; //appends two strings

    [cell.textLabel setText:cellValue];



    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

}

J'ai essayé plusieurs différentes méthodes. N'importe qui? Si je pouvais donner un nom à chaque UITableView un autre nom qui devrait le faire, mais il ne me laisse pas modifier tableView à autre chose sans s'écraser.

source d'informationauteur New to iPhone