Drawing from upper left
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