ios - 使用UIPageViewController切换页面引起的崩溃
黄舟
黄舟 2017-04-17 14:29:34
0
0
1432
我使用了https://github.com/cwRichardKim/RKSwipeBetweenViewControllers 这里的开源代码,这份代码用UIPageViewController来实现多个VC左右滑动切换,同时也可以使用一个类似toolbar的标签控件来点击按钮切换页面。代码的情况大致这样(可以直接到Github上下载Demo,Demo也存在这个问题),然后我运行的是Xcode6.3,设备6+,系统8.3。出现的问题是:
1.频繁地点击按钮来切换VC的页面,一定会引发崩溃
2.用手指左右频繁滑动来切换VC的页面,同时也频繁点击切换的按钮,一定会引发崩溃

console里报的错误信息是:
一共有三种:
第一种
*** Assertion failure in -[_UIQueuingScrollView _didScrollWithAnimation:force:], /SourceCache/UIKit/UIKit-3347.44/_UIQueuingScrollView.m:799
2015-04-21 04:00:54.069[1163:170863] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to determine navigation direction for scroll'
*** First throw call stack:
(0x181d302d8 0x19355c0e4 0x181d30198 0x182be4ed4 0x186df10d0 0x186df0de4 0x186ded408 0x18691def0 0x1867ad5ac 0x1867a066c 0x186c114fc 0x186764484 0x186762830 0x181ce82a4 0x181ce5230 0x181ce5610 0x181c112d4 0x18b4276fc 0x1867d6fac 0x10001dcd0 0x193bdaa08)
libc++abi.dylib: terminating with uncaught exception of type NSException
第二种
*** Assertion failure in -[_UIQueuingScrollView _enqueueCompletionState:], /SourceCache/UIKit/UIKit-3347.44/_UIQueuingScrollView.m:499
2015-04-21 04:02:05.680[1169:171222] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Duplicate states in queue'
*** First throw call stack:
(0x181d302d8 0x19355c0e4 0x181d30198 0x182be4ed4 0x186deec20 0x186def4e0 0x186d68280 0x186d68404 0x10002b6fc 0x1867a5404 0x18678e4e0 0x1867a4da0 0x1867a4a2c 0x18679df68 0x18677118c 0x186a12324 0x18676f6a0 0x181ce8240 0x181ce74e4 0x181ce5594 0x181c112d4 0x18b4276fc 0x1867d6fac 0x100035cd0 0x193bdaa08)
libc++abi.dylib: terminating with uncaught exception of type NSException
第三种
*** Assertion failure in -[UIPageViewController queuingScrollView:didEndManualScroll:toRevealView:direction:animated:didFinish:didComplete:], /SourceCache/UIKit/UIKit-3347.44/UIPageViewController.m:1875
2015-04-21 04:04:39.301[1190:172356] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No view controller managing visible view '
*** First throw call stack:
(0x181d302d8 0x19355c0e4 0x181d30198 0x182be4ed4 0x186d6a28c 0x186deff20 0x186defd1c 0x186dec414 0x186df1890 0x186df1a88 0x186ded41c 0x18691def0 0x1868207f4 0x186def500 0x186d68280 0x186d68404 0x10009b9bc 0x1867a5404 0x18678e4e0 0x1867a4da0 0x1867a4a2c 0x18679df68 0x18677118c 0x186a12324 0x18676f6a0 0x181ce8240 0x181ce74e4 0x181ce5594 0x181c112d4 0x18b4276fc 0x1867d6fac 0x1000a5cd0 0x193bdaa08)
libc++abi.dylib: terminating with uncaught exception of type NSException

求大神解惑

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

répondre à tous(0)
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal