We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ad5915 commit 497e990Copy full SHA for 497e990
stdlib/public/SDK/UIKit/UIKit.swift
@@ -198,8 +198,11 @@ struct _UIViewMirror : _MirrorType {
198
}
199
200
UIGraphicsBeginImageContextWithOptions(bounds.size, false, 0.0)
201
-
202
- let ctx = UIGraphicsGetCurrentContext()
+
+ // UIKit is about to update this to be optional, so make it work
203
+ // with both older and newer SDKs. (In this context it should always
204
+ // be present.)
205
+ let ctx: CGContext! = UIGraphicsGetCurrentContext()
206
UIColor(white:1.0, alpha:0.0).set()
207
CGContextFillRect(ctx, bounds)
208
_v.layer.renderInContext(ctx)
0 commit comments