gpt4 book ai didi

iOS 'NSInternalInconsistencyException',原因 : 'UICollectionViewFlowLayout internal error

转载 作者:行者123 更新时间:2023-12-01 16:14:57 25 4
gpt4 key购买 nike

我在自调整大小的表格 View 中有一个 Collection View 。当用户点击 Collection View 时,我会呈现另一个 View 。

我仍然可以纵向呈现该 View 。但是当我旋转到横向时,我收到了这个错误并崩溃了。我该怎么办?

2017-01-23 16:52:16.448417 SWEET Mini[1638:647130] * Assertion failure in -[_UIFlowLayoutSection computeLayoutInRect:forSection:invalidating:invalidationContext:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3600.6.22/UIFlowLayoutSupport.m:823 2017-01-23 16:52:16.451537 SWEET Mini[1638:647130] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UICollectionViewFlowLayout internal error'



我只是提出另一个这样的观点。
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
MWPhotoBrowser *browser = [[MWPhotoBrowser alloc] initWithDelegate:self];
browser.zoomPhotosToFill = NO;
[browser setCurrentPhotoIndex:(indexPath.row)];
browser.enableSwipeToDismiss = YES;
UINavigationController *browseNav = [[UINavigationController alloc] initWithRootViewController:browser];

if ([[AppDelegate instance].window.rootViewController isKindOfClass:[UINavigationController class]])
{
UINavigationController *nav = (UINavigationController *) [AppDelegate instance].window.rootViewController;
[nav presentViewController:browseNav animated:YES completion:nil];
}
else if ([[AppDelegate instance].window.rootViewController isKindOfClass:[UITabBarController class]]) {
UITabBarController *tab = (UITabBarController *) [AppDelegate instance].window.rootViewController;
[tab presentViewController:browseNav animated:YES completion:nil];
}
}

最佳答案

我遇到了同样的错误信息。事实证明,它只发生在模拟器上,在真实设备上一切正常。

关于iOS 'NSInternalInconsistencyException',原因 : 'UICollectionViewFlowLayout internal error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41802419/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com