• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: window resizing events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: window resizing events


  • Subject: Re: window resizing events
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Fri, 30 Apr 2004 19:20:37 -0700

Hello...

You could also use the NSView instance method inLiveResize during drawRect: to determine whether to draw or not...

- (void)drawRect:(NSRect)aRect
{
if (![self inLiveResize])
{
/* insert normal drawing code here */
}
}


You might also be able to do a similar check in setFrame: and scale the image is inLiveResize returns FALSE, which would take care of the case when the window is maximized and the rest of the general cases where the view is resized. (I think you would still need to scale the image in viewDidEndLiveResize, since if I remember correctly, the final setting of the frame when the window is drag resized is done while inLiveResize still returns TRUE, but this should be fairly easy to verify)

Hope that helps,

Louis

I played around with viewDidEndLiveResize some more. It works great for actual resizing with the mouse. However, hitting the maximize button doesn't seem to work with viewDidEndLiveResize. Is there another method for handling the maximize button. To be more clear, it's the green button with the plus sign in the top left of every window.

Thanks,
David


On Apr 30, 2004, at 3:03 PM, matt neuburg wrote:

On Fri, 30 Apr 2004 09:56:09 -0700, "David Piasecki" <email@hidden>
said:
I'm trying to figure out how to monitor window resizing events such
that my NSView doesn't redraw until the user has finished resizing the
window and let go of the mouse. I was also trying to figure out how to
stretch or shrink an image as its NSImageView is resized.

Did you read about viewDidEndLiveResize? m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: window resizing events (From: "David Piasecki" <email@hidden>)

  • Prev by Date: Setting the timezone?
  • Next by Date: Too many ports?
  • Previous by thread: Re: window resizing events
  • Next by thread: Re: window resizing events
  • Index(es):
    • Date
    • Thread