• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bugs with parentViewController?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bugs with parentViewController?


  • Subject: Re: Bugs with parentViewController?
  • From: Rick Mann <email@hidden>
  • Date: Sun, 18 Nov 2012 01:17:52 -0800

On Nov 17, 2012, at 6:39 , Matt Neuburg <email@hidden> wrote:

> When you have questions of this sort, one useful approach, rather than asking others, is to test. When I say "test", I mean, isolate the issue entirely from the current project and work in a new project of utmost simplicity, so that whatever complications or mistakes the real project introduces are not introduced there. I am always surprised at the apparent failure of questioners to do this, as it is such a helpful and easy technique.

This was a relatively minor problem, one I was able to work around, albeit at the expense of some elegance. I posted because I found no substantial discussion online, and wanted to see if this was a known problem. I have a lot of work to do, and didn't want to take the time to build a test app. I had already done more exploration within my own app than I wanted to do, and I was confident in my analysis (that it wasn't some side-effect of the complexity of my app).

Nevertheless, for you, I made a simple app, and it exhibits the same problem. I've narrowed it down, and discovered a few other problems along the way.

In fact, the chain is broken for the master view controller ancestry when it's displayed in a popover (for example, in portrait view when you reveal the master view controller). Moreover, it does this by calling -setParentViewController: directly, rather than by calling -removeFromParentViewController.

I suppose it does this because UIPopoverController is (inexplicably) not a UIViewController.

So: while the master is not shown, or while it is shown in landscape (not in as a popover), the entire hierarchy is as you would expect: the UISplitViewController has two child VCs, and those two child VCs have the SVC as their parent.

But if the master is a popover, then its parent is nil (or the parent of the UINavController it's embedded in). Note that the SVC still holds it as a child; UIPopoveController is cheating by setting the parent to nil directly.

The other things I learned are that watchpoints and symbolic breakpoints don't work in LLDB, but they seem to work fine in GDB.

--
Rick




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Bugs with parentViewController? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: NSSearchField selecting after sending its action
  • Next by Date: NSText Field changes my window size
  • Previous by thread: Re: Bugs with parentViewController?
  • Next by thread: IB>Button>Attributes>Position almost works
  • Index(es):
    • Date
    • Thread