100grams/HGPageScrollView

Hi,I run sample HGPageScrollView crash. Help...

Closed this issue · 3 comments

Hi:
I run(iPhone4 (iOS5, Xcode 4.2)) HGPageScrollView crash.I's crash log:

*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<MyTableViewController: 0x1cc060> should have parent view controller:<HGPageScrollViewSampleViewController: 0x1c3860> but actual parent is:<UINavigationController: 0x1ccdf0>'
*** First throw call stack:
(0x341698bf 0x358851e5 0x341697b9 0x341697db 0x352181b9 0x351d97ef 0x351d92bf 0x351d918b 0x51c3 0x35b3 0x340c3435 0x351f19eb 0x352b73cf 0x340c3435 0x351f19eb 0x351f19a7 0x351f1985 0x351f16f5 0x351f202d 0x351f050f 0x351eff01 0x351d64ed 0x351d5d2d 0x35d00df3 0x3413d553 0x3413d4f5 0x3413c343 0x340bf4dd 0x340bf3a5 0x35cfffcd 0x35204743 0x211d 0x20dc)

help me.

Hi,

I haven't tested HGPageScrollView with iOS 5.1 beta yet, but this looks like an issue which is easy to isolate.
if your project doesn't require embedding a navigation stack inside a single HGPageView, you can comment out lines 82-87 in HGPageScrollViewSampleViewController.m and the problem should go away.

These are the lines to comment out:

MyTableViewController *myViewController = [[[MyTableViewController alloc] initWithNibName:@"MyTableViewController" bundle:nil] autorelease];
UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:myViewController] autorelease];
[navController setToolbarHidden:NO];
MyPageData *pageData = [[[MyPageData alloc] init] autorelease];
pageData.navController = navController;
[_myPageDataArray insertObject:pageData atIndex:0];

cheers,

Rotem Rubnov
http://www.100grams.nl

On 10 Feb 2012, at 7:41 AM, setdi wrote:

Hi:
I run(iPhone4 (iOS5, Xcode 4.2)) HGPageScrollView crash.I's crash log:

*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller: should have parent view controller: but actual parent is:'
*** First throw call stack:
(0x341698bf 0x358851e5 0x341697b9 0x341697db 0x352181b9 0x351d97ef 0x351d92bf 0x351d918b 0x51c3 0x35b3 0x340c3435 0x351f19eb 0x352b73cf 0x340c3435 0x351f19eb 0x351f19a7 0x351f1985 0x351f16f5 0x351f202d 0x351f050f 0x351eff01 0x351d64ed 0x351d5d2d 0x35d00df3 0x3413d553 0x3413d4f5 0x3413c343 0x340bf4dd 0x340bf3a5 0x35cfffcd 0x35204743 0x211d 0x20dc)

help me.


Reply to this email directly or view it on GitHub:
#5

Hello:
I can not comment out. Project require embedding a navigation stack inside a single HGPageView. How to solve?
THK.

This is now fixed!
Commit 4a7f4c3