Instance Method

getRectsExposedDuringLiveResize:count:

Returns a list of rectangles indicating the newly exposed areas of the view.

Declaration

- (void)getRectsExposedDuringLiveResize:(NSRect *)exposedRects count:(NSInteger *)count;

Parameters

exposedRects

On return, contains the list of rectangles. The returned rectangles are in the coordinate space of the view.

count

Contains the number of rectangles in exposedRects; this value may be 0 and is guaranteed to be no more than 4.

Discussion

If your view does not support content preservation during live resizing, the entire area of your view is returned in the exposedRects parameter. To support content preservation, override the preservesContentDuringLiveResize property in your view and have your implementation return YES.

If the view decreased in both height and width, the list of returned rectangles will be empty. If the view increased in both height and width and its upper-left corner stayed anchored in the same position, the list of returned rectangles will contain a vertical and horizontal component indicating the exposed area.

See Also

Managing Live Resize

inLiveResize

A Boolean value indicating whether the view is being rendered as part of a live resizing operation.

preservesContentDuringLiveResize

A Boolean value indicating whether the view optimizes live-resize operations by preserving content that has not moved.

rectPreservedDuringLiveResize

The rectangle identifying the portion of your view that did not change during a live resize operation.

- viewWillStartLiveResize

Informs the view of the start of a live resize—the user has started resizing the view.

- viewDidEndLiveResize

Informs the view of the end of a live resize—the user has finished resizing the view.