2015-07-08 15:33:55 UTC
I have an open panel to which I am trying to add an accessory view. That much works. However I would like the accessory view to resize to fit the width of the parent window. It’s just a textual description, after all.
An old thread here:
suggests this is not trivial to do.
I have tried the suggested monitoring of NSWindowDidResizeNotification (and also tried NSViewFrameDidChangeNotification), and these don’t seem to work quite right. There have been plenty of OS changes since that thread was written, so probably no surprises there.
What happens is that it doesn’t seem possible to *shrink* the Open window (I guess the ‘hard’ size that I am setting for my view is affecting the minimum size of the overall window) and, much more alarmingly, I get crashes when resizing.
The alternative suggestion related to IB struts doesn’t seem to work for me either. I set all four edge struts and tried both with and without the ‘resizeable’ arrows in the middle of the view. No effect.
Can anyone advise on the current and correct way of getting the accessory view to resize appropriately? It seems this should be a common desired behaviour, but haven’t had any luck doing it or finding any recent examples/advice on google…
Cocoa-dev mailing list (Cocoaemail@example.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: