ZIndexedGroupView
@objcMembers public final class ZIndexedGroupView: UIView
UIView which only holds views that conform to ZIndexedView
, where views are ordered in the
subview list by their zIndex
property. This causes each view to be rendered and hit-tested inside
ZIndexedGroupView
based on their zIndex
.
Note
All views should be added viaupsertView(:)
. Using any other insertion method
on this class may have adverse effects. Adding any view other than one that conforms to
ZIndexedView
will result in an app crash.
-
Allows for hit testing while sub views are outside the bounds of a groupView.
Declaration
Swift
public override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView?
-
Inserts or updates a
UIView
in this group, where it is sorted amongst other subviews based on itszIndex
.Declaration
Swift
public func upsertView<T>(_ view: T) where T: UIView, T:ZIndexedView