On Dec 24, 2010, at 2:22 PM, Matt Neuburg wrote:

> On Fri, 24 Dec 2010 12:12:32 -0600, Alex Kac <a...@webis.net> said:
> 
>> we have a view controller that we use with a UISearchDisplayController that 
>> sits in a UIToolbar on an iPad
> 
> No, it doesn't. A UISearchDisplayController is a controller. A UIToolbar is a 
> view. A controller can't "sit in" a view. It is really helpful if your 
> question is formulated so as to use language and concepts accurately. 
> Otherwise everyone has to guess what you really mean, which is difficult and 
> inaccurate. Maybe what you mean is that a UISearchBar sits in a UIToolbar, 
> but it's really hard to tell, and we shouldn't have to guess (and doesn't 
> explain what the UISearchDisplayController has to do with the story). Your 
> misformulation might or might not even mask the source of the problem.

You are right that you cannot add controllers to a toolbar - yet I was only 
slightly wrong in my description: it was the UISearchBar from the 
UISearchDisplayController and I'm sorry I didn't make that clear. Look Sorry 
Matt - it was Christmas Eve and I was a bit frustrated to be working that 
morning and so didn't make it as clear as I should have.

> 
>> If a memory warning occurs while the popover is up, the popover goes away, 
>> the search bar goes away and its gone
> 
> Again - "the popover"? You never said anything up to this point about a 
> popover, so how does it come in? 

Fromt the UISearchDisplayController. It presents the popover for us in this 
case which I'm not too crazy about as I'd like more control over that, but it 
is what it is.

> Basically, it will help if you describe what is really happening. Of course 
> having a problem is frustrating, but don't take it out on the list! :) Taking 
> the time for structure a clear and accurate description of the problem could 
> actually help you towards a solution, as well as allowing others to reproduce 
> or analyze it usefully.

Actually I believe I did with one mistake in my description - the bar being in 
the toolbar from the controller.

> 
> It sounds like what you're really complaining about is that when there's a 
> memory warning your popover is dismissed. Is that right? This doesn't happen 
> for me when I'm displaying a popover and I simulate a memory warning in the 
> simulator, so again, how are you generating your warning? 

Its not our popover - its the UISearchDisplayControllers, hence the question. 
Since I don't control the popover nor do I have access to it, it seemed strange 
for that to occur. 

> Basically, what I'm asking is that you do what a scientist would do in lab 
> notes: say enough to constitute instructions so that someone else can perform 
> the same experiment. Otherwise no one even knows that the problem really is.

I realize you're trying to be helpful, but unfortunately you really came across 
to me as simply being condescending - especially when the post was not as 
poorly described as you posit.

In any case I did find the problem. This code is shared amongst iPad and iPhone 
and on iPhone the UISearchDisplayController's view has a superview while on the 
iPad it did not. Once I fixed that basic issue, the problem went away as it 
should. 

What confused me originally was that I don't have control over the controller's 
popover and couldn't see why it was being dismissed. But as I sat there 
thinking about it I realized that the controller gets the didReceiveMemory 
delegate call and checks to see if the view can be unloaded by seeing if it has 
a superview. If it does not it removes it. That sparked me looking into how we 
instantiate the controller and then I realized the mistake. 


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to