Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8739081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:51:49+00:00 2026-06-13T10:51:49+00:00

I facing issue in iOS 6 iPad On button click -> open popover with

  • 0

I facing issue in iOS 6 iPad

  1. On button click -> open popover with UITable
  2. On select a row -> modalviewcontroller open.
  3. dismiss modalviewcontroller (it works fine)
  4. Then again click on button, app crash on button click (1st step)

this issue is only in iOS 6. It works fine in iOS 5, iOS 4.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 <UITableView: 0xb847400; frame = (0 0; 185 104); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0xa469e50>; layer = <CALayer: 0xa469f00>; contentOffset: {0, 0}> is associated with <UIViewController: 0xa462f60>. Clear this association before associating this view with <UIViewController: 0xa5dac40>.'
*** First throw call stack:
(0x2769012 0x1d0be7e 0x2768deb 0xca1309 0xd385ac 0xd34a90 0x69b19 0x1d1f705 0xc56920 0xc568b8 0xd17671 0xd17bcf 0xd16d38 0xc8633f 0xc86552 0xc643aa 0xc55cf8 0x29a2df9 0x29a2ad0 0x26debf5 0x26de962 0x270fbb6 0x270ef44 0x270ee1b 0x29a17e3 0x29a1668 0xc5365c 0x24ca 0x23d5)
libc++abi.dylib: terminate called throwing an exception

Adding Code

listTable.frame = CGRectMake(0, 0, listWidth, listItemHeight*[listArray count]-1);
UIViewController* popoverContent = [[UIViewController alloc] init];
popoverContent.view = listTable;
popoverContent.contentSizeForViewInPopover = CGSizeMake(listWidth, listItemHeight*[listArray count]);
listPopOver = [[UIPopoverController alloc] initWithContentViewController:popoverContent];
[listPopOver setDelegate:self];
[listPopOver setPopoverContentSize:listTable.frame.size];
[listPopOver presentPopoverFromRect:self.frame inView:self.superview permittedArrowDirections:arrowDirection animated:YES];
[listTable reloadData];
[popoverContent release];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:51:50+00:00Added an answer on June 13, 2026 at 10:51 am

    Check out your exception more closely:

    'UIViewControllerHierarchyInconsistency', reason:
    'A view can only be associated with at most one view controller at a time!
    View UITableView: 0xb847400; frame = (0 0; 185 104); clipsToBounds = YES;
    autoresize = W+H; gestureRecognizers = NSArray: 0xa469e50; layer = CALayer: 0xa469f00;
    contentOffset: {0, 0} is associated with UIViewController: 0xa462f60.
    Clear this association before associating this view with UIViewController: 0xa5dac40.'
    

    Specifically:

    A view can only be associated with at most one view controller at a time!
    View UITableView: 0xb847400
    is associated with
    UIViewController: 0xa462f60. 
    Clear this association before associating this view with 
    UIViewController: 0xa5dac40.
    

    What this means is that you had a view controller, and it’s .view property was set to your listTable object. Then, without destroying that association, you took another view controller and tried to set its .view property to the listTable object. This is a violation of the view hierarchy rules, which Apple is enforcing more heavily as of iOS 6.0, to the point where it now throws an exception and crashes your app.

    So the real problem here is that you are using the same listTable object with two view controllers, specifically popoverContent. This means that your old popoverContent is still in existence when your code executes a second time, which is why it crashes on the 2nd run and not the first. I would guess that somehow your code is not fully deallocating and destroying your old popover before the new one is trying to be created; if you make sure this happens you might be fine.

    I also notice that, apparently, you are using the same listTable for both popovers. Do you perhaps want to lazily create this listTable for each popover instead of keeping it around?

    If you want to investigate things more, you can set a breakpoint in your code and print descriptions of your different views and view controllers, using the po command, to see what hex addresses match the ones that will subsequently appear in your exception, and get more information about the problem. Or, you can even print descriptions using the hex addresses directly: po 0xa469e50 for example (may have to typecast it, though).

    Other than that, you haven’t really provided enough code for someone to just look at it and say what the problem is 🙂 But the above should help you work it out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with facebook-ios-sdk, It working fine But I am facing issue related
We are facing an issue with iOS development where we repeatedly poll our servers
I am facing one issue because of URL encoding in window.open function when used
I'm making my first iOS App, and I'm facing my first (little) issue. The
I have been facing an issue. I implemented push notification in iOS with custom
I am facing issue while i load a form on ajax request. i followed
I have been facing issue with sphinx result set for string attribute. Below is
I got below JSON string, i facing issue parsing because it contains non english
We have implemented webservice which generates xml response. I am facing issue while invoking
Facing some issue in Talend Admin Console, the jobs that are running from IDE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.