• 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: Drawing from lower left, why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing from lower left, why?


  • Subject: Re: Drawing from lower left, why?
  • From: Ricky Sharp <email@hidden>
  • Date: Fri, 15 Jun 2007 18:05:25 -0500


On Jun 15, 2007, at 5:34 PM, Ken Tozier wrote:

Since February, I've spent probably a solid month just trying to make a custom view look the way I want. Because of Apple's draw from the lower left silliness, this view has been, by a very wide margin, hardest part of my whole application.

Apparently, the only way to draw from the upper left is to flip the view. If you flip a view, you have to invert all calculations (and think upside down) . If you use any GUI widgets, you have to subclass them and flip them too. If you add transforms to the mix, that affects subview spacing and text size calculation. if you resize the window, and want the subviews near the top to look like they haven't moved, you have to completely recalculate everything in the view. If there are auto-hidden scrollbars, you have to query the view on each draw and completely recalculate everything so the scrollbar show/hide doesn't shift everything over to the left. Add to all this the headache of adding tracking rectangles and highlighting and the whole thing becomes a freaking nightmare.

Rather than posting a rant, please describe the exact problems you're having. For one, it's not clear what type of tranforms you're applying. Unless the transforms perform scaling, I don't see how flipped vs. non-flipped will change subview spacing or text size.


In terms of recalculating subviews, have you set up the correct springs in IB?

Why did Apple subject us to this bass-ackwards way of drawing? The natural way to read information (at least 90+ percent of the time) is from top to bottom I just don't understand their logic and it makes drawing a living hell.

One could argue that _not_ using cartesian coordinates is being backwards. But Apple provides APIs to work with both coordinate systems, so it's not an issue. Personally, the only time I use flipped views would be if the view contains multiple cells (e.g. matrix, table). Being flipped in that case does make things easier (since as you move down the view, both the y-coordinate and index of your cells increase).


Again, please post specific problems you're having. From what you write above, it really sounds like you're "fighting the framework".

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: Drawing from lower left, why?
      • From: Ken Tozier <email@hidden>
References: 
 >Drawing from lower left, why? (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: Drawing from lower left, why?
  • Next by Date: Re: Leopard 9a466
  • Previous by thread: Re: Drawing from lower left, why?
  • Next by thread: Re: Drawing from lower left, why?
  • Index(es):
    • Date
    • Thread