Creates a bitmap-based graphics context and makes it the current context.
SDKs
- iOS 2.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- UIKit
Declaration
func UIGraphicsBeginImageContext(_ size: CGSize)
Parameters
size
The size of the new bitmap context. This represents the size of the image returned by the
UIGraphics
function.Get Image From Current Image Context()
Discussion
This function is equivalent to calling the UIGraphics
function with the opaque parameter set to false
and a scale factor of 1
.
This function may be called from any thread of your app.