我有一个视图控制器,其中显示了两个集合视图。我现在想从两个集合视图转移到不同的目标控制器。我在下面有这段代码,但没有运气。
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
JSTRCollectionViewCell *selectedCell = (JSTRCollectionViewCell *)sender;
JSTRBrowserViewController *targetVC = (JSTRBrowserViewController *) [segue destinationViewController];
targetVC.ndesc = selectedCell.description.text;
targetVC.ntitle = selectedCell.title.text;
targetVC.nimage = selectedCell.image.image;
targetVC.ncat = selectedCell.category.text;
targetVC.ndate = selectedCell.date.text;
SliderCollectionViewCell *selectedCell1 = (SliderCollectionViewCell *)sender;
SliderBrowserViewController *targetVC1 = (SliderBrowserViewController *) [segue destinationViewController];
targetVC1.sldesc = selectedCell1.description.text;
targetVC1.sldate = selectedCell1.date.text;
targetVC1.slcat = selectedCell1.category.text;
targetVC1.sltitle = selectedCell1.title.text;
targetVC1.slimage = selectedCell1.image.image;
}