Skip navigation.
 
mlRe: keeping view's bounds fixed
FROM : Nathan Vander Wilt
DATE : Tue Jan 29 07:42:36 2008

--- Quincey Morris <<email_removed>>
escribió:
>
> On Jan 28, 2008, at 20:38, Nathan Vander Wilt wrote:
>
> > Since I *have* explicitly set the bounds
> rectangle,
> > why is it still being automatically updated to
> match
> > the frame's height/width? Where can I reset the
> > bounds, so that they always are set to
> > NSMakeRect(-180, -90, 360, 180) when my view's
> > drawRect is called? The -viewDidEndLiveResize
> method
> > will not work, because that message isn't passed
> when
> > the window's zoom button is activated.
>
> I don't have the "why?", but I did have a similar
> situation and after 
> lots of hair-tearing-out the only reliable way I
> found was to monitor 
> frame-change notifications.


Thanks for the confirmation. I still haven't figured
out why the bounds is getting automatically updated
either, but I did find an option on Leopard:
-(void)viewWillDraw gets called before -drawRect:, and
seems to be a good spot for checking and resetting the
boundaries if necessary. (Please someone correct me if
this is not the case!)

Your notification workaround will come in handy for
pre-10.5 compatibility, though.

thanks,
–natevw


      ____________________________________________________________________________________
¡Capacidad ilimitada de almacenamiento en tu correo!
No te preocupes más por el espacio de tu cuenta con Correo Yahoo!:                     
http://correo.espanol.yahoo.com/

Related mailsAuthorDate
mlkeeping view's bounds fixed Nathan Vander Wilt Jan 29, 05:38
mlRe: keeping view's bounds fixed Quincey Morris Jan 29, 06:30
mlRe: keeping view's bounds fixed Nathan Vander Wilt Jan 29, 07:42
mlRe: keeping view's bounds fixed Ken Thomases Jan 30, 05:51