diff options
author | Julian Rex <julian.rex@mapbox.com> | 2018-09-12 19:11:13 -0400 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2018-09-25 18:41:00 -0700 |
commit | b626ad40ddec5924ae7fcefcf774941f36bb363a (patch) | |
tree | a5a247bc5d11da49d3455ffda9798dbae6a82271 /platform/ios/src/MGLMapView.mm | |
parent | 66e95ac2ab6260654ba09b26e83591e3d4334c02 (diff) | |
download | qtlocation-mapboxgl-b626ad40ddec5924ae7fcefcf774941f36bb363a.tar.gz |
Enabled `presentsWithTransaction` to help synchronize UIKit elements with the GL view.
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 92d3724b03..216464a7d4 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -636,6 +636,10 @@ public: _glView.layer.opaque = _opaque; _glView.delegate = self; + // `CAEAGLLayer.presentsWithTransaction` was introduced in iOS 9. + CAEAGLLayer *eaglLayer = MGL_OBJC_DYNAMIC_CAST(_glView.layer, CAEAGLLayer); + eaglLayer.presentsWithTransaction = YES; + [_glView bindDrawable]; [self insertSubview:_glView atIndex:0]; _glView.contentMode = UIViewContentModeCenter; |