2013-07-18 1 views
0

내 iPad 앱은 가로 방향 만 지원합니다. 나는 ABNewPersonViewController (navigationcontroller에서 apple docs suggestion으로)를 모달로 제시했으며 land scape에 있습니다. 이제ABNewPersonViewController imagePicker 방향 및 충돌 문제

  1. 내가 "사진 추가"하기 위해 애 쓰고 imagePicker은 내 요구 사항에 대한 인물에 모달로 표시됩니다.
  2. 그런 다음 사진을 추가 한 직후 이미지를 두드리는 화면에 3 개의 버튼이있는 팝업이 표시됩니다 (- 사진 선택, 사진 편집, 사진 삭제). 하나, 둘, 대한

    *** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View <ABActionSheet: 0x9bbfde0; baseClass = UIActionSheet; frame = (0 0; 272 156); opaque = NO; animations = { opacity=<CABasicAnimation: 0xaa73d30>; }; layer = <CALayer: 0x9bd0370>> is associated with <_UIActionSheetHostingController: 0x9bb1000>. Clear this association before associating this view with <_UIActionSheetHostingController: 0xaa7a610>.' 
    

    모든 솔루션 : 처음 두 버튼을 클릭

는 다음과 같은 오류 메시지가 내 응용 프로그램 충돌? 감사 & 관련 광전자는

+0

일부 코드보기 ...? –

+0

ABNewPersonViewController * newpersonVC = [[ABNewPersonViewController alloc] init]; newpersonVC.newPersonViewDelegate = 자기; UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController : newpersonVC]; [self presentViewController : nav animated : 예 완료 : 없음]; – AUK4SO

답변

1

예외는 명확

"'A view can only be associated with at most one view controller at a time! "

당신은 그 다시 UIPopOverController 제시와 UIViewController에을 제시 것을 말한다. 버튼 trieng의 인덱스를 클릭하여 컨트롤러를 제시하면 불가능합니다. '

당신의 물건에 따라 dismissViewController 방법으로 시도하십시오.

+0

이해합니다. 하지만 우리는 팝 오버에 대한 액세스 권한이 없습니다. – AUK4SO

0

[navController setModalPresentationStyle : UIModalPresentationFormSheet]; 내 문제가 해결되었습니다.