IOS上的导航栏错误

时间:2014-01-23 09:53:00

标签: ios objective-c xcode storyboard uistoryboard

我正在使用此结构在Xcode 5上开发应用程序

app schema

在添加最后一个视图之前,一切都很棒,这是一个简单的视图,可以提供有关您在上一个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;
    }   
}

0 个答案:

没有答案