0
我有2个视图控制器 - 一个显示图像的collectionView,另一个是相应的细节视图 - 非常基本。问题是collectionView中的项目由于某种原因无法选择(触摸但没有任何反应)。此外,我没有使用导航控制器来嵌入collectionView VC,更喜欢使用自定义按钮来展开segue - 这个工作吗?UICollectionView Segue没有显示细节VC
我建立了从collectionView Cell到Detail VC的连接。
在prepareForSegue
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"detailSegue"]) {
LPDiaryDetailViewController *destViewController = segue.destinationViewController;
NSIndexPath *indexPath = [self.collectionView indexPathForCell:sender];
LocationImage *image = self.savedItems[indexPath.row];
destViewController.captionString = image.caption;
}
}
在详细回去放松 – noobsmcgoobs 2014-11-06 06:34:57
@noobsmcgoobs展开将撤消你使用的任何前进segue。所以,如果你进行模态演示,那么展开会解雇 - 如果你愿意,这样做很好。 – rdelmar 2014-11-06 06:47:33