Instance Method

mtkView:drawableSizeWillChange:

Updates the view’s contents upon receiving a change in layout, resolution, or size.

Required.

Declaration

- (void)mtkView:(MTKView *)view drawableSizeWillChange:(CGSize)size;

Parameters

view

The view requesting that its contents be updated.

size

The view’s new drawable size.

Discussion

Use this method to recompute any view or projection matrices, or to regenerate any buffers to be compatible with the view’s new size.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software