Re: Changing order of views dynamically
Re: Changing order of views dynamically
- Subject: Re: Changing order of views dynamically
- From: Andreas Mayer <email@hidden>
- Date: Mon, 19 Mar 2007 16:36:12 +0100
Am 19.03.2007 um 15:40 Uhr schrieb Sergey Shapovalov:
1. The overlapped controls don't come from a NIB. I create them
dynamically at run time.
It doesn't matter where they come from.
2. I don't need to swap the views. I need to swap the *order* of
the views.
Why? They should not overlap anyway. Please read:
http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaViewsGuide/WorkingWithAViewHierarchy/chapter_4_section_1.html
Especially:
"Note: For performance reasons, Cocoa does not enforce clipping among
sibling views or guarantee correct invalidation and drawing behavior
when sibling views overlap. If you want a view to be drawn in front
of another view, you should make the front view a subview (or
descendant) of the rear view."
Well, what I'm implementing is pretty much like a time-line control
many video editors have. I have a custom control for every frame
(for simplicity, let's consider it just a button).
I suggest you implement the time line as a (single) custom control
and use a (single) custom cell to draw the frames.
This eliminates both, the problem of overlapping views and the
problem of sorting them.
Andreas
_______________________________________________
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