• 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
Drawing from upper left
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Drawing from upper left


  • Subject: Drawing from upper left
  • From: Ken Tozier <email@hidden>
  • Date: Tue, 26 Jun 2007 08:51:13 -0400

Hi

I'm trying to create a few nested custom views:

- A wrapping thumbnail matrix similar to iPhoto's which will live in
- A collapsible view like items in Spotlight's "show all" results window which will live in
- A scrolling list (also like Spotlight's "show all.") that knows how to redraw itself in response to subviews expanding or collapsing


The stumbling block for me (I've been struggling with this for months) has been getting these nested views to either draw from the upper left corner or appear to draw from there.

I've tried flipped views but the combination of flipping, unflipping all subviews so that they are right side up along with transforms scaling and moving the thumbnails into position became ridiculously complex.

I tried using the translateOriginToPoint method but that necessitated writing special functions for all setFrame/setBounds functions in all subclasses to convert the y offset to a negative number.

I tried setting the resize masks but the collapsible requirement wreaks havoc on the positioning of the items

I'd post some code but it's a fused blob of spaghetti at the moment with all the failed attempts to draw from the top-left. What I'd like is the simplest, cleanest way to draw custom views programatically so that they either: are drawn from the upper left, or appear to be drawn from there.

Any GUI masters point me in the right direction?

Many thanks

Ken


_______________________________________________

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


  • Prev by Date: Re: Play a song with QTMovie
  • Next by Date: Re: Play a song with QTMovie
  • Previous by thread: Re: List of keyboard layouts
  • Next by thread: Re: Drawing from upper left
  • Index(es):
    • Date
    • Thread