• 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: keeping view's bounds fixed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keeping view's bounds fixed


  • Subject: Re: keeping view's bounds fixed
  • From: Nathan Vander Wilt <email@hidden>
  • Date: Tue, 29 Jan 2008 00:42:36 -0600 (CST)

--- Quincey Morris <email@hidden>
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/
_______________________________________________

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

References: 
 >Re: keeping view's bounds fixed (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Running process as root from Cocoa
  • Next by Date: Re: Running process as root from Cocoa
  • Previous by thread: Re: keeping view's bounds fixed
  • Next by thread: Re: keeping view's bounds fixed
  • Index(es):
    • Date
    • Thread