UIView(Viewport) Category Reference

Declared in UIView+Viewport.h

Overview

UIView viewport transmission and events.

The viewport is the currently visible part of the view.

  viewport

The current viewport of the UIView

@property (nonatomic, readonly) CGRect viewport

Declared In

UIView+Viewport.h

  disableViewportUpdates

Whether or not updates to the viewport are disabled.

@property (nonatomic) BOOL disableViewportUpdates

Declared In

UIView+Viewport.h

– setNeedsUpdateViewport

Marks the viewport as needing an update.

- (void)setNeedsUpdateViewport

Declared In

UIView+Viewport.h

– updateViewportIfNeeded

Updates the viewport if an update is needed.

- (void)updateViewportIfNeeded

Declared In

UIView+Viewport.h

– viewportForSubview:

Calculates the viewport of a subview.

- (CGRect)viewportForSubview:(nonnull UIView *)subview

Parameters

subview

The subview to calculate the viewport of.

Return Value

The calculated viewport of the subview.

Declared In

UIView+Viewport.h

– viewportWillChangeFrom:to:

Called when the viewport will change.

- (void)viewportWillChangeFrom:(CGRect)previousViewport to:(CGRect)viewport

Parameters

previousViewport

The previous and current viewport.

viewport

The new viewport that is about to be set.

Declared In

UIView+Viewport.h

– viewportDidChangeFrom:to:

Called when the viewport did change.

- (void)viewportDidChangeFrom:(CGRect)previousViewport to:(CGRect)viewport

Parameters

previousViewport

The previous viewport.

viewport

The new and current viewport.

Declared In

UIView+Viewport.h