UIGraphicsEndImageContext()
Removes the current bitmap-based graphics context from the top of the stack.
Declaration
func UIGraphicsEndImageContext()Discussion
You use this function to clean up the drawing environment put in place by the UIGraphicsBeginImageContext(_:) function and to remove the corresponding bitmap-based graphics context from the top of the stack. If the current context was not created using the UIGraphicsBeginImageContext(_:) function, this function does nothing.
This function may be called from any thread of your app.