0

I'm using Two tableview cells on single tableview like dis...enter image description here

and when I put subviews on both cells it is showing Outlets cannot connected to repeating content in uitableview

Nicolas Miari
  • 16,006
  • 8
  • 81
  • 189
Mohammed Hussain
  • 176
  • 2
  • 13

1 Answers1

0

You can access the views with the help "tag". First set tag to the required view then access it as follows,

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"tCell"];
    //I have set CollectionView tag to 100 and Label tag to 50
    UICollectionView *collect = (UICollectionView *) [cell viewWithTag:100]; //if the view is CollectionView
    UILabel *lbl = (UILabel *) [cell viewWithTag:50]; //if it is a UILabel
    return cell;
}
Sanket_B
  • 735
  • 9
  • 26