Re: Strange resizing issue with NSView
Re: Strange resizing issue with NSView
- Subject: Re: Strange resizing issue with NSView
- From: Daniel Jalkut <email@hidden>
- Date: Mon, 30 Jan 2006 20:23:19 -0500
John - I have noticed some funny behavior with IB and autosizing
views. In particular, I think what I observed was that if for
instance a nib is saved with an empty window, the
"setAutoresizesSubviews" property of the window's contentView gets
archived as NO.
With the skepticism I've earned from that experience, I wouldn't be
surprised if there were other scenarios in which a nib ends up
getting saved with that property unexpectedly set to NO. Maybe an
optimization attempt on the part of IB.
What I would do is add some logging to your app that spits out the
autoresizesSubviews property all the way up the view chain (while
([thisView superview] != nil). See if you discover a culprit along
the way.
For my particular case, I had to add code to my awakeFromNib to
explicitly set the autoeresizesSubviews back to YES on the window's
contentView.
Hope this helps (or at least jostles some new ideas :) )...
Daniel
On Jan 30, 2006, at 7:43 PM, John Stiles wrote:
Despite setting the auto-resize mask, I found that the web view
would not resize no matter what I did. I added a call to
[HTMLSheetWebContainer setAutoresizesSubviews:YES] but that was
ineffective.
After a bit of head-scratching and debugging, I realized that if I
added any resizing object inside the NSBox in my nib, suddenly the
web-view started resizing too. I can't explain why that worked, but
it did. I ended up adding a tiny Custom View to the bottom corner
of my NSBox, and all seemed to be well.
Is this a bug in the NSView system or am I missing something?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden