Focus ring and layer-backed views
Focus ring and layer-backed views
- Subject: Focus ring and layer-backed views
- From: Oleg Krupnov <email@hidden>
- Date: Fri, 01 Mar 2013 11:26:21 +0200
I have two custom views in a container view. The first view is a
custom layer-hosting view, the second one is an ordinary custom view
without layers.
Both views can have keyboard focus and draw focus rings around
themselves. As usual, the focus ring is drawn partially on the
superview.
In the first view, I have a CALayer stretching a bit beyond around the
frame of the view so that it can display the focus ring. The second
view simply calls NSSetFocusRingStyle() and relies on Cocoa for
drawing on the superview.
Now I have a problem that the focus ring gets clipped by the view
frame in either of two cases.
If the container view is not layer-based (wantsLayer == NO), then the
first view's focus ring gets clipped, but the second view's focus ring
is fine. Else if the container view is layer-based (wantsLayer ==
YES), then the first view's focus ring is fine, but the second's is
clipped.
It seems like a known problem. Is there some workaround?
Thanks,
_______________________________________________
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