Como implementar métodos de delegação e fonte de dados para o UICollectionView quando ele está dentro de um TableViewCell personalizado no iOS, objetivo C

Nota: não quero usar nenhuma biblioteca de terceiros

eu tenhotableview com um costumetable view cell (exibição de tabela funcionando bem).Agora dentro dotable view cell Eu quero implementar umcollection view.Agora, meu problema é: onde devo implementar odelegate métodos edata source métodos para a exibição de coleção, que está dentro docustom table view cell . abaixo está o que eu tentei.

Implementação do Tabel View Controller

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 5;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    FirstTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"tvcell"];

    return cell;
}

trabalhando corretamente

agora dentro desteFirstTableViewCell existe umcollection view.

Este é o meu arquivo FirstTableViweCell.h

#import <UIKit/UIKit.h>

@interface FirstTableViewCell : UITableViewCell<UICollectionViewDelegate,UICollectionViewDataSource>
@property (weak, nonatomic, nullable) IBOutlet UICollectionView *insideCollectionView;

@property (strong, nonnull,nonatomic) NSArray *mycollectionData;
- (void)setColletionData :(nonnull NSArray *)collectionData;

@end

e este é o meu arquivo FirstTableViewCell.m

#import "FirstTableViewCell.h"

@implementation FirstTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.insideCollectionView.delegate = self;

    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setColletionData:(NSArray *)collectionData
{
    self.mycollectionData = collectionData;
    [self.insideCollectionView reloadData];
}


- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
{
    return 1;
}

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    return 10;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    UICollectionViewCell *ccell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cvcell" forIndexPath:indexPath];
    return ccell;
}

@end

método a seguir

- (void)setColletionData:(NSArray *)collectionData
    {
        self.mycollectionData = collectionData;
        [self.insideCollectionView reloadData];
    }

Eu costumava definirarray&nbsp;paracollectionView, nocellforrowatindexpath&nbsp;notableview

Então, qual é a maneira correta de implementarDataSource&nbsp;eDelegate&nbsp;métodos para oCollectionView&nbsp;que está dentro doCustom Table View Cell.