2
2
20vik132014-06-04 12:40:12
Apple Xcode
20vik13, 2014-06-04 12:40:12

Changing the data of a tableView inserted into a viewCollectionCell?

Good afternoon. Tell me please.
I need to change the data in the cells of a tableView inserted into a viewCollectionCell.
tableView has Tag=100, tableViewCell Tag=200.
There is a code that allows you to display data in only one cell of the table (see below).
In the myIndexPath variable, I can only store the range 0-1. Tell me how to change the value of myIndexPath or how to solve the problem in another way?
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *identifier = @"Cell";
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexPath];
UITableView *myTable = (UITableView *) [cell viewWithTag:100];
UITableViewCell *myCell = (UITableViewCell *) [cell viewWithTag:200];
myCell = [myTable dequeueReusableCellWithIdentifier:@"eventCell" forIndexPath:myIndexPath];
myCell.textLabel.text =[NSString stringWithFormat:@"%@", @0];
return cell;
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question