我在iOS 8上向我的应用程序添加自定义输入视图时遇到问题。在iOS 7上,它运行正常,但是在切换到iOS 8时,一切都失败了。
这是堆栈跟踪:
2014-06-03 21:23:54.237 MyApp[1910:47245] *** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<UICompatibilityInputViewController: 0x1103f9d40>
should have parent view controller:<StopChooser: 0x11083e200> but requested parent is:<UIInputWindowController: 0x110858800>'
*** First throw call stack:
(
0 CoreFoundation 0x00000001042eee35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000103b919a0 objc_exception_throw + 45
2 CoreFoundation 0x00000001042eed6d +[NSException raise:format:] + 205
3 UIKit 0x00000001023d94cd -[UIViewController _addChildViewController:performHierarchyCheck:notifyWillMove:] + 184
4 UIKit 0x0000000102977a2b -[UIInputWindowController changeToInputViewSet:] + 416
5 UIKit 0x0000000102973f56 -[UIInputWindowController moveFromPlacement:toPlacement:starting:completion:] + 185
6 UIKit 0x000000010297826a -[UIInputWindowController setInputViewSet:] + 526
7 UIKit 0x0000000102973c97 -[UIInputWindowController performOperations:withAnimationStyle:] + 50
8 UIKit 0x00000001027559bb -[UIPeripheralHost(UIKitInternal) setInputViews:animationStyle:] + 1054
9 UIKit 0x0000000102422afd -[UIResponder becomeFirstResponder] + 468
10 UIKit 0x00000001023235d3 -[UIView(Hierarchy) becomeFirstResponder] + 99
11 UIKit 0x00000001029cdbfb -[UITextField becomeFirstResponder] + 51
+ 177
lib: terminating with uncaught exception of type NSException
(lldb)
相关部分是前几行。有人可以解释吗?所有我打电话是myTextview.inputView = keyboard; 键盘是在情节提要中创建并通过IBOutlet链接的UIView。
慕丝7291255
守着星空守着你
蛊毒传说