我使用 SwReveal 视图控制器将值从表视图传递到集合视图控制器。当我单击集合视图中的单元格时,我存储了集合视图单元格的索引路径。但是当我选择一个表并将一个值传递给索引路径集合视图时。不显示值的单元格。它是空的......这是我的代码
-(void)viewWillAppear:(BOOL)animated{
text=seltext;
NSLog(@"text %@",text);
**// HERE I AM GETTING VALUES FROM TABLE VIEW CONTROLLER**
self.displayindex=Viewindex;
NSLog(@"self dispaly %@",Viewindex);
**// HERE I AM GETTING INDEX PATH OF SELECTED COLLECTION CELL**
Cell *cells = (Cell *)[collectionData cellForItemAtIndexPath: self.displayindex];
cells.subjectLabel.text=@"djhfkjdshfjkhd";
cells.cellView.backgroundColor=[UIColor greenColor];
NSLog(@"cell is %@",cells);
NSLog(@"text %@",text);
**// CELL IS NULL HERE AND NOTHING IS DISPLAYING EVEN IF I PASS THE CELL FRO ITEM INDEXPATH**
}