• 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: How to keep a subview centered - autoresizing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to keep a subview centered - autoresizing


  • Subject: Re: How to keep a subview centered - autoresizing
  • From: "Erik M. Buck" <email@hidden>
  • Date: Fri, 8 Feb 2002 15:35:59 -0600

> Maybe someday Apple will replace springs and struts with a less broken
> model. But they were talking about how springs and struts was broken
> back when I was working at NeXT, so... you may not want to hold your
> breath. :->
>

I agree that centering is a problem with the current implementation of
springs+struts, but there is nothing wrong that can not be fixed.

The basic problem is that the current implementation is truncating to
integers inappropriately. If the math was consistently performed with float
and rounded rather than truncated to integers ONLY at the last opportunity,
many problems would vanish. The broken behavior now is just a long standing
bug and there are work-arounds.
_______________________________________________
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: How to keep a subview centered - autoresizing (From: email@hidden)

  • Prev by Date: Cocoa and CFXMLTreeCreateFromData
  • Next by Date: NSButtonCell subclass (partially transparent images)
  • Previous by thread: Re: How to keep a subview centered - autoresizing
  • Next by thread: Modal Window in IB
  • Index(es):
    • Date
    • Thread