PTPassthroughView


@interface PTPassthroughView : UIView

A view that allows touch events to pass through to views behind it.

This view behaves like a transparent overlay: if a touch does not hit any of its subviews, the touch is ignored by the view itself and passed on to underlying views in the view hierarchy. This is useful for overlay interfaces that should not block interaction with views beneath.

  • Initializes a view with the specified frame.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFrame:(CGRect)frame;

    Swift

    init(frame: CGRect)

    Parameters

    frame

    the frame rectangle of the view

    Return Value

    An initialized view.

  • Initializes a view with data in an unarchiver.

    Declaration

    Objective-C

    - (nullable instancetype)initWithCoder:(nonnull NSCoder *)coder;

    Swift

    init?(coder: NSCoder)

    Parameters

    coder

    The unarchiver to be used

    Return Value

    An view, or nil if unarchiving the view was unsuccessful.