2012-04-18 12 : 58 : 07.108 MYiPad [12574 : C07] 응용 프로그램을 인해 캐치되지 않는 예외 UIViewControllerHierarchyInconsistency을 종료, 이유 : 보기 만 최대 하나의 뷰와 연관 될 수 있습니다 컨트롤러에서 시간! <보기 UITableView : 0xb0eae00; 프레임 = (0 0; 320 960); clipsToBounds = YES; 자동 크기 조정 = W + H; 제스처 인식기 = < NSArray : 0xac460e0>; layer = < CALayer : 0xac46830>; contentOffset : {-0, -20}> 은 < RootViewController : 0xac20f20>과 관련됩니다. 이보기를 연결하기 전에이 연관을 지우십시오.UIViewControllerHierarchyInconsistency 오류 - 응용 프로그램이 충돌 유지
먼저 던져 호출 스택 : (0x1b57012 0x153ce7e 0x1b56deb 0x4cf309 0x5665ac 0x562a90 0x6b0232 0x4e257 0x21e3f 0x184a8c 0x19c417d 0x1836d2 0xc4c2 0x1aae59 0x1a8f22 0x1aa16a 0x1a8edd 0x1a9055 0xf6338 0x1e64a81 0x1e63d33 0x1ea1e3a 0x1af98fd 0x1ea24bc 0x1ea2435 0x1d8c3a0 0x1adaf3f 0x1ada96f 0x1afd734 0x1afcf44 0x1afce1b 0x24917e3 0x2491668 0x48165c 0x2c8d 0x2bc5을 0x1)의 libC++ abi.dylib : 예외를 던지는라고 종료
* - (무효)의 viewDidLoad {
[self.tableView initWithFrame:self.tableView.frame style:UITableViewStyleGrouped];
self.tableView.contentInset = UIEdgeInsetsMake(20.0,0.0,0.0,0.0);
self.appDelegate = (FCDBiPadAppDelegate *)[[UIApplication sharedApplication] delegate];
[self.tableView setBackgroundView:nil];
[self.tableView setBackgroundView:[[[UIView alloc] init] autorelease]];
[self.tableView setBackgroundColor:[UIColor colorWithRed:217 green:220 blue:225 alpha:0.9]];
unsigned int b;
NSScanner *scanner = [[NSScanner alloc] initWithString:[[[Engine sharedInstance] properties] objectForKey:@"NAVBAR_COL"]];
[scanner scanHexInt:&b];
[scanner release];
self.navigationController.navigationBar.tintColor=[UIColor blackColor];
//self.navigationController.navigationBar.tintColor=UIColorFromRGB(b);
views = [[NSMutableArray alloc] init];
NSMutableArray *innerArray =[[NSMutableArray alloc] init];
[innerArray addObject:@"Login"];
txnlist = [[NSMutableArray alloc] init];
[txnlist addObject:@"RRLGN00"];
NSMutableDictionary *menu1Dict = [NSMutableDictionary dictionaryWithObject:innerArray forKey:@"MENU"];
[menu1Dict setObject:txnlist forKey:@"MENUKEY"];
[views addObject:menu1Dict];
Engine *myEngine = [Engine sharedInstance];
**[myEngine setTableview:self.tableView];**
[myEngine settableData:self.views];
[super viewDidLoad];
self.clearsSelectionOnViewWillAppear = NO;
self.contentSizeForViewInPopover = CGSizeMake(320.0, 600.0);
self.navigationItem.hidesBackButton = TRUE;
} *
나는이 오류가 유지하고 내가 잘못하고 오전 그것이 무엇인지 알아낼 수 없습니다. 내 코코아 콩 파일, 분할보기 컨트롤러를 사용하고 있습니다. 메뉴를 처리하는 루트보기 컨트롤러와 세부 사항을 처리하는 상세보기 컨트롤러 (분명히). 이 줄을 주석 처리 할 때 [myEngine setTableview : self.tableView]; 앱이 실행되고 UIViewControllerHierarchyInconsistency 오류가 발생하지 않지만 메뉴를로드 할 수 없으므로 주석을 달고 있습니다. 누군가 제발 나를 도와주세요, 나는 이것을 빨리 필요로합니다. 제 삶은 그것에 달려 있습니다. 다시 한 번 감사드립니다.
EDITED----
* - (BOOL) 애플리케이션 (UIApplication *) 애플리케이션 didFinishLaunchingWithOptions : (NSDictionary와 *)를 launchOptions {
[엔진 sharedInstance] setmenu_curr "RRLGN00"@]; [[엔진 sharedInstance] setProperties : [[NSMutableDictionary 할당] initWithDictionary : [NSMutableDictionary dictionaryWithContentsOfFile : [[NSBundle mainBundle] 번들 경로] stringByAppendingPathComponent : @ "app.plist"]]]]];
[[[Engine sharedInstance] properties] setObject:NSLocalizedString(@"FCDB_LANGID", nil) forKey:@"idLang"];
[[Engine sharedInstance] setUrl:[[[[Engine sharedInstance] properties] objectForKey:@"ENTITY_URL"] objectAtIndex:0]];
splashController = [[SplashViewController alloc]initWithNibName:@"SplashViewController" bundle:[NSBundle mainBundle]];
splashController.delegate=self;
[self.window addSubview:splashController.view];
[self.window makeKeyAndVisible];
return YES;
} - (무효) hideSplash {[splashController.view removeFromSuperview];
self.splitViewController =[[UISplitViewController alloc]init];
self.rootViewController=[[RootViewController alloc]init];
self.detailViewController=[[DetailViewController alloc]init];
UINavigationController *rootNav=[[UINavigationController alloc]initWithRootViewController:rootViewController];
UINavigationController *detailNav=[[UINavigationController alloc]initWithRootViewController:detailViewController];
//detailNav.navigationBarHidden=YES;
self.splitViewController.viewControllers=[NSArray arrayWithObjects:rootNav,detailViewController,nil];
self.splitViewController.delegate=detailViewController;
[window addSubview:self.splitViewController.view];
[self.window makeKeyAndVisible];
은} *
나는 당신이 무슨 말을 듣고 있지만 내가 메신저 뭔가 아주 간단 잘못, 또는 몇 가지 간단한 조정을하고 생각합니다. 위의 코드는 내 애플 리케이션 대리인입니다. 나는 http://www.iriphon.com/2012/03/31/uncaught-exception-uiviewcontrollerhierarchyinconsistency-reason-child-view-controller-should-have-parent-view-controller-but-actual-parent-is-or-apples-new-uiviewcontroller-hierarc/에서이 웹 사이트를 확인하고 내가 그것을 메신저 뭘 함께 할 수있다 생각합니다. 내가 틀렸다면, 나에게 말해 줘.
im이 올바르게 interpresting 경우 모르겠지만 두 줄의 동일한보기를 가리키는 컨트롤러가 있습니다 .. self.splitViewController.viewControllers = [NSArray arrayWithObjects : rootNav, detailViewController, nil]; self.splitViewController.delegate = detailViewController; [window addSubview : self.splitViewController.view]; – Sonic