The drawable to be used for the current frame.
- iOS 9.0+
- macOS 10.11+
- tvOS 9.0+
If all drawable objects are in use, the value of this property is
nil. Your app should check that
current is not
nil before attempting to draw. The value of this property changes only after returning from one of the drawing functions, either
draw from a subclassed instance of the view, or
draw from the view’s delegate.
MTLRender object to render into the drawable’s texture and present it for display (typically registered via the
present method of a command buffer). Try to minimize the time between when you fetch the drawable and when you submit the command buffer that uses it. For example, you might perform other work on the CPU, render to offscreen textures or execute compute passes, then obtain the drawable and encode a command buffer to render to it. After you submit this command buffer, release all strong references to the drawable. A texture can be reused only if it is not onscreen and all strong references to the drawable have been released. If you don’t release drawables correctly, the view will run out of drawables to vend.