KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
UPDATE: No longer occurs on iOS 6 beta 1 I am currently working on adapting an existing iOS 4 application with the new iOS 5 SDK. I found a new crash when presenting a UIWebView in a modal view controller that reads a Youtube video. Starting to read the video is fine, but when I try to set it in full screen, I get the following exception : Exception: UIViewControllerHierarchyInconsistency, child view controller:<UIViewController: 0x6aef180> should have parent view controller:<WebViewController: 0x6a706c0> but requested parent is:<MPInlineVideoViewController: 0x6ae5d40> Here is how I instanciate and present my modal view controller in my main view controller : - (IBAction)buttonReleased:(id)sender { WebViewController *webVC = [[WebViewController alloc] initWithNibName:@"WebViewController" bundle:[NSBundle mainBundle]]; webVC.modalTransitionStyle = UIModalTransitionStyleCoverVertical; webVC.modalPresentationStyle = UIModalPresentationPageSheet; [self presentModalViewController:webVC animated:YES]; } I use the UIModalPresentationPageSheet as modalPresentationStyle, when I set this value to UIModalPresentationFullScreen, the error no longer occurs. In my modal WebViewController, here is how I load my Youtube video : - (void)viewDidLoad { [super viewDidLoad]; [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=bDlm3eLRut0"]]]; } Any ideas on this problem ? I can provide a full sample code that isolates this crash if needed. Thanks !
Tags (comma-separated)
Save Edits
Cancel