On Jan 15, 2010, at 15:53:29, David Duncan wrote: > On Jan 15, 2010, at 2:31 PM, Rick Mann wrote: > >> Hi. We have a requirement to clip a set of subviews' drawing to an arbitrary >> path or clip image specified by a containing (parent) view. Is there any way >> to accomplish this? > > > Do the subviews move? If not, it would seem that the best way to deal with > that would be to pass the same clip to each of the subviews and have them > apply that clip before they draw (with proper transforms of course). > > If not, this could be done (with performance penalty) using the layer's mask > property. Simplest way I can think is to make a new layer, assign the > contents of the parent layer to that new layer's contents, then assign that > layer as the mask of all subviews. This may require a bit of futzing around > to get right however.
The subviews will consist of a UIScrollView and a set of UIButtons. Generally, I'd like to avoid subclassing them, if possible. I'm implementing a control with behaviors very similar to a horizontal UIPickerView. Unfortunately, it lives in a non-rectangular shape, and the surrounding elements are transparent and should NOT show the control underneath. I'll look into your suggestion. Thanks! -- RIck _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com