4

I have a UIPageViewController which holds two screens.

self.pageController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil];

And one of the screen contains tableview on iphone /Collection view on ipad.On some user event we are setting the contentOfset to move the tableview a bit up

            [table setContentOffset:cell.frame.origin animated:YES];

Then user navigates to next screen using UIPageviewcontroller

Above usecase causes crash on the app with the following logs

2014-11-14 09:04:46.783 tibbr[12329:79833] *** Assertion failure in -[_UIQueuingScrollView _setWrappedViewAtIndex:withView:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/_UIQueuingScrollView.m:338
2014-11-14 09:04:46.786 tibbr[12329:79833] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected subviews'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000113512f35 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000111be7bb7 objc_exception_throw + 45
    2   CoreFoundation                      0x0000000113512d9a +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00000001115c15df -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
    4   UIKit                               0x00000001108715e0 -[_UIQueuingScrollView _setWrappedViewAtIndex:withView:] + 215
    5   UIKit                               0x0000000110871b0a -[_UIQueuingScrollView _replaceViews:updatingContents:adjustContentInsets:animated:] + 672
    6   UIKit                               0x0000000110873e57 -[_UIQueuingScrollView setView:direction:animated:completion:] + 524
    7   UIKit                               0x00000001107d5e16 -[UIPageViewController _setViewControllers:withScrollInDirection:animated:completion:] + 483
    8   UIKit                               0x00000001107d5f78 -[UIPageViewController setViewControllers:direction:animated:completion:] + 157
    12  UIKit                               0x000000011024e8be -[UIApplication sendAction:to:from:forEvent:] + 75
    13  UIKit                               0x0000000110355410 -[UIControl _sendActionsForEvents:withEvent:] + 467
    14  UIKit                               0x00000001103cf9ea -[UISegmentedControl _setSelectedSegmentIndex:notify:animate:] + 570
    15  UIKit                               0x00000001103d1a0f -[UISegmentedControl touchesEnded:withEvent:] + 143
    16  UIKit                               0x00000001105fb540 _UIGestureRecognizerUpdate + 9487
    17  UIKit                               0x0000000110293ff6 -[UIWindow _sendGesturesForEvent:] + 1041
    18  UIKit                               0x0000000110294c23 -[UIWindow sendEvent:] + 667
    19  UIKit                               0x00000001102619b1 -[UIApplication sendEvent:] + 246
    20  UIKit                               0x000000011026ea7d _UIApplicationHandleEventFromQueueEvent + 17370
    21  UIKit                               0x000000011024a103 _UIApplicationHandleEventQueue + 1961
    22  CoreFoundation                      0x0000000113448551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    23  CoreFoundation                      0x000000011343e41d __CFRunLoopDoSources0 + 269
    24  CoreFoundation                      0x000000011343da54 __CFRunLoopRun + 868
    25  CoreFoundation                      0x000000011343d486 CFRunLoopRunSpecific + 470
    26  GraphicsServices                    0x0000000113e859f0 GSEventRunModal + 161
    27  UIKit                               0x000000011024d420 UIApplicationMain + 1282
    28  tibbr                               0x000000010cb942d1 tibbr + 58065
    29  libdyld.dylib                       0x0000000112660145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Kindly do suggest me what could be root cause of this issue

Sundar_Mob
  • 155
  • 12
  • Hi there, I'm currently facing the same issue. Were you able to do something about it ? – Niko Mar 04 '15 at 15:12
  • Possible duplicate of [UIPageViewController NSInternalInconsistencyException](http://stackoverflow.com/questions/24675000/uipageviewcontroller-nsinternalinconsistencyexception) – user102008 Nov 03 '15 at 02:38

0 Answers0