Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?
Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?
- Subject: Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?
- From: Motti Shneor <email@hidden>
- Date: Sun, 22 Jul 2012 12:00:16 +0300
Thanks everyone (Dennis, Kyle)
I Implemented the suggested delegate --- and it doesn't even get called!!!!
Here is my implementation, in case I'm really stupid:
- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize {
NSSize min = [sender minSize];
NSSize max = [sender maxSize];
if (frameSize.width > max.width ||
frameSize.height > max.height ||
frameSize.width < min.width ||
frameSize.height < min.height)
return sender.frame.size;
else
return frameSize;
}
And then here is my console log from within a resizing delegate call for some inner subview (NSSplitView).
-(void) splitView:(NSSplitView *)splitView resizeSubviewsWithOldSize:(NSSize)oldSize {
NSSize newSize = splitView.frame.size; // to accompany the oldSize...
.
. // my handling code in here
.
.
#ifdef PA_DEBUG
if (newSize.height < totalMinSize.height) {
NSLog(@"%@ too short for subviews (need %.1f, has %.1f)). %@ will be collapsed", splitView, totalMinSize.height, newSize.height, autoClosePanelView);
NSSize winMinSize = _splitView.window.contentMinSize;
NSView *contentView = _splitView.window.contentView;
NSSize winCurrentSize = contentView.frame.size;
NSLog(@"Window min content size:%@ current size %@", NSStringFromSize(winMinSize), NSStringFromSize(winCurrentSize));
}
Which yields in the console the following log lines:
2012-07-22 11:44:01.178 AT&T Connect[19369:407] <NSSplitView: 0x6659ac0> too short for subviews (need 579.0, has 517.0)). <PAMeetingMinutesBaseView: 0x6977460> will be collapsed
2012-07-22 11:44:01.178 AT&T Connect[19369:407] Window min content size:{1001, 579} current size {1001, 517}
As you can see, my window is forced to get to 517 pixels height, despite my imposed minSize of 579 pixels, and in spite of the implementation you suggested.
What now?
On 19 ביול 2012, at 18:09, Dennis wrote:
> On Jul 19, 2012, at 5:17 AM, Motti Shneor wrote:
>
>> How can a view disregard resizing request? It is simply resized....
>
> How about...
>
> - (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize
>
> in your window delegate? As I recall, this works to prevent resizing by returning the size you want the window to be set to.
>
Motti Shneor
e-mail: email@hidden
phone: +972-8-9267730
mobile: +972-54-3136621
----------------------------------------
Ceterum censeo Microsoftinem delendam esse
_______________________________________________
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