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.