Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Xcode6 and iOS8 crash due UIViewControllerHierarchyInconsistency #25

Closed
jomnius opened this issue Sep 18, 2014 · 5 comments
Closed

Xcode6 and iOS8 crash due UIViewControllerHierarchyInconsistency #25

jomnius opened this issue Sep 18, 2014 · 5 comments

Comments

@jomnius
Copy link

jomnius commented Sep 18, 2014

Using SAMTextView component via storyboard, Xcode5 was ok. When compiled with Xcode6 and run under iOS8, app crashes:

*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:UICompatibilityInputViewController: 0x18b58560 should have parent view controller:MyViewController: 0x178d5620 but requested parent is:UIInputWindowController: 0x169fc600'

Haven't found a fix yet, stack overflow seemed to suggest removing component from superview and/or not using storyboard at all. Still researching, but hoping "you" (anyone) could suggest a fix right away.

@jomnius
Copy link
Author

jomnius commented Dec 4, 2014

Bumb. Any ideas, anyone? Xcode6 deadline closing in fast...

@soffes
Copy link
Owner

soffes commented Dec 4, 2014

Well since the error is related to view controllers, I doubt text view is related. Can you provide a sample project reproducing this?

Sam

On Thu, Dec 4, 2014 at 5:52 AM, Jouni Miettunen notifications@github.com
wrote:

Bumb. Any ideas, anyone? Xcode6 deadline closing in fast...

Reply to this email directly or view it on GitHub:
#25 (comment)

@jomnius
Copy link
Author

jomnius commented Dec 8, 2014

Did some more debugging, as I should have in the beginning: crash even with basic UITextView in storyboard, so not connected to SAMTextView. There's something very strange in this project I've inherited.

As it is, case can be closed. Sorry for the trouble!

@jomnius
Copy link
Author

jomnius commented Apr 5, 2015

Found the problem: storyboard contained a toolbar that was set to textView.inputAccessoryView in code. Worked ok with Xcode5, but crashes with Xcode6. Problem has nothing to do with SAMTextView, therefore this case can be closed. Sorry for the trouble!

@jomnius jomnius closed this as completed Apr 5, 2015
@jomnius
Copy link
Author

jomnius commented Apr 5, 2015

Well, one more time with the fix: I still create toolbar in storyBoard (I'm visual person, things are easier when I see them), but I "reset" the parentViewController with a call to removeFromSuperview. Seems to work.

@property (weak, nonatomic) IBOutlet UIToolbar *keyboardToolbar;
[self.keyboardToolbar removeFromSuperview];
self.feedbackText.inputAccessoryView = self.keyboardToolbar;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants