• 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: nswindow resize question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nswindow resize question


  • Subject: Re: nswindow resize question
  • From: Boaz Stuller <email@hidden>
  • Date: Mon, 7 Jul 2003 20:43:31 -0400

NSView classes have 3 methods, -inLiveResize, -viewDidBeginLiveResize and -viewDidEndLiveResize, that let you know if you're in a live resize. Just check -inLiveResize in your drawInRect: method to decide when to cut back on the updating, and then call [self setNeedsDisplay:YES] in -viewDidEndLiveResize to get it to redraw correctly at the end. All this assumes that you are making a custom subclass of NSImageView to do all this.

One other method you should be aware of is NSGraphicContext's -setImageInterpolation: method. You can use this to switch to a faster image scaling method, like NSImageInterpolationNone, in -viewDidBeginLiveResize and switch back to the better one in -viewDidEndLiveResize.

Bo

On Monday, July 7, 2003, at 07:50 PM, Bill So wrote:

However, windowDidResize is invoked when I am still dragging the mouse. And so, the image is refreshed for many times during the course.

I'd like to do the refresh only when the user releases the mouse.
_______________________________________________
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: 
 >nswindow resize question (From: Bill So <email@hidden>)

  • Prev by Date: Re: When the sender is an NSMatrix...
  • Next by Date: Re: Dragging from NSTableView to Finder
  • Previous by thread: nswindow resize question
  • Next by thread: Field editor delegate doesn't work
  • Index(es):
    • Date
    • Thread