我正在使用此结构在Xcode 5上开发应用程序
在添加最后一个视图之前,一切都很棒,这是一个简单的视图,可以提供有关您在上一个UICollectionView
中选择的对象的更多信息。
当我点击Cell
时出现下一个视图,但已损坏,我也收到以下错误
[6313:a0b] nested push animation can result in corrupted navigation bar
[6313:a0b] Finishing up a navigation transition in an unexpected state.
Navigation Bar subview tree might get corrupted.
然后当我点击“返回”时,出现以下错误,应用程序崩溃:
[6313:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: 'Can't add self as subview'
所有连接都是简单的推送
有任何线索吗?
提前致谢
编辑:
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:
(NSIndexPath *)indexPath{
if (collectionView == _collectionView2){
selectedOffer = [offerArray objectAtIndex:indexPath.row];
[self performSegueWithIdentifier:@"offerDetail" sender:collectionView];
}
}
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
if([segue.identifier isEqualToString:@"offerDetail"]){
OfferDetailViewController *con = (OfferDetailViewController*)segue.destinationViewController;
con.myOffer = selectedOffer;
}
}