Re: Change view on resize
Re: Change view on resize
- Subject: Re: Change view on resize
- From: Andy Lee <email@hidden>
- Date: Fri, 10 Apr 2009 03:13:18 -0400
On Apr 10, 2009, at 12:31 AM, Kyle Sluder wrote:
On Thu, Apr 9, 2009 at 6:52 PM, Dave Keck <email@hidden> wrote:
To satisfy both these requirements, I would first disable window
resizing for your window in IB. Then, somewhere in your app's
initialization code, do a little something like this:
Calculator.app apparently does the opposite, from looking at its nib.
It starts with resize enabled and then somehow eliminates the
drag-resizing functionality.
I bet it calls setShowsResizeIndicator: in awakeFromNib. This hides
the grow box but doesn't suppress drag-resizing. Using F-Script
Anywhere in Calculator.app, I see the window's delegate does indeed
implement windowWillResize:toSize:, which is presumably how it
suppresses drag-resizing.
I see the window delegate also implements windowShouldZoom:toFrame:.
I suspect that method cycles the window state between Basic/Scientific/
Programmer and returns NO.
On a side note: I notice the Basic/Scientific/Programmer menu items
are not in the nib, so they must be generated programmatically at
startup. I also can't find the views for these three modes in the
nib, so either I'm missing something or they are generated
programmatically, which seems like a strange approach.
On another side note: I hoped the Calculator sample code could answer
all our questions, but it is so out of date (2003) that Xcode 3.1.2
can't open it, so clearly it's not the code for the current
Calculator.app.
--Andy
_______________________________________________
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