I have an application that works fine in iOS 7 and Xcode 5. As soon as I upgrade it to iOS 8 and Xcode 6, it will work when the application tries to shift the UIDatePicker in the view while listening to textField. I use a storyboard. Does anyone have an idea why?
I read about it, but this is for Xib.
IOS 6 app crash - UIViewControllerHierarchyInconsistency
please help thanks
my code is:
- (void)textFieldDidBeginEditing:(UITextField *)textField {
my crash log
2014-09-14 13:12:52.930 Pay 2014-15 free[2191:83060] *** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<UICompatibilityInputViewController: 0x7be0a570> should have parent view controller:<AddHoursViewController: 0x7c38e800> but requested parent is:<UIInputWindowController: 0x7c238a00>' *** First throw call stack: ( 0 CoreFoundation 0x02101df6 __exceptionPreprocess + 182 1 libobjc.A.dylib 0x01d8ba97 objc_exception_throw + 44 2 CoreFoundation 0x02101d1d +[NSException raise:format:] + 141 3 UIKit 0x008cff9c -[UIViewController _addChildViewController:performHierarchyCheck:notifyWillMove:] + 210 4 UIKit 0x00f4b44d -[UIInputWindowController changeToInputViewSet:] + 576 5 UIKit 0x00f4c1be __43-[UIInputWindowController setInputViewSet:]_block_invoke + 103 6 UIKit 0x007f73bf +[UIView(Animation) performWithoutAnimation:] + 82 7 UIKit 0x00f4bf9c -[UIInputWindowController setInputViewSet:] + 374 8 UIKit 0x00ce9101 __64-[UIPeripheralHost(UIKitInternal) setInputViews:animationStyle:]_block_invoke1459 + 43 9 UIKit 0x00f473af -[UIInputWindowController performOperations:withAnimationStyle:] + 56 10 UIKit 0x00ce9006 -[UIPeripheralHost(UIKitInternal) setInputViews:animationStyle:] + 1242 11 UIKit 0x00ce91df -[UIPeripheralHost(UIKitInternal) setInputViews:animated:] + 73 12 UIKit 0x00ce922b -[UIPeripheralHost(UIKitInternal) setInputViews:] + 68 13 UIKit 0x00ce1478 -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:] + 1803 14 UIKit 0x0092be95 -[UIResponder(UIResponderInputViewAdditions) reloadInputViews] + 316 15 UIKit 0x0092b1dc -[UIResponder becomeFirstResponder] + 562 16 UIKit 0x007f1de0 -[UIView(Hierarchy) becomeFirstResponder] + 114 17 UIKit 0x00fb7ffb -[UITextField becomeFirstResponder] + 51 18 UIKit 0x00bbde8f -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] + 200 19 UIKit 0x00bc04b6 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] + 2762 20 UIKit 0x00bb3d27 _UIGestureRecognizerSendActions + 327 21 UIKit 0x00bb25a4 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 561 22 UIKit 0x00bb45ed -[UIGestureRecognizer _delayedUpdateGesture] + 60 23 UIKit 0x00bb7f6a ___UIGestureRecognizerUpdate_block_invoke661 + 57 24 UIKit 0x00bb7e2d _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 317 25 UIKit 0x00babd36 _UIGestureRecognizerUpdate + 3720 26 UIKit 0x007c771b -[UIWindow _sendGesturesForEvent:] + 1356 27 UIKit 0x007c857f -[UIWindow sendEvent:] + 769 28 UIKit 0x0078daa9 -[UIApplication sendEvent:] + 242 29 UIKit 0x0079d8de _UIApplicationHandleEventFromQueueEvent + 20690 30 UIKit 0x00772079 _UIApplicationHandleEventQueue + 2206 31 CoreFoundation 0x020257bf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 32 CoreFoundation 0x0201b2cd __CFRunLoopDoSources0 + 253 33 CoreFoundation 0x0201a828 __CFRunLoopRun + 952 34 CoreFoundation 0x0201a1ab CFRunLoopRunSpecific + 443 35 CoreFoundation 0x02019fdb CFRunLoopRunInMode + 123 36 GraphicsServices 0x0394624f GSEventRunModal + 192 37 GraphicsServices 0x0394608c GSEventRun + 104 38 UIKit 0x00775e16 UIApplicationMain + 1526 39 Pay 2014-15 free 0x0014ed7d main + 141 40 libdyld.dylib 0x0736cac9 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb) `enter code here`
source share