From 5c8481e83646b9cae482a803c878fb007f370035 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Tue, 19 Dec 2017 19:42:09 -0800 Subject: [PATCH] Fixed black ARTSurfaceView Summary: If we draw using `drawRect:` with possible transparent pixels, we have to have `isOpaque = YES`. https://developer.apple.com/documentation/uikit/uiview/1622622-isopaque Differential Revision: D6609013 fbshipit-source-id: e483fd38b09c07e33b8b424d22c7a1adf81e6916 --- Libraries/ART/ARTSurfaceView.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Libraries/ART/ARTSurfaceView.m b/Libraries/ART/ARTSurfaceView.m index ee7183d7d2..16e2029083 100644 --- a/Libraries/ART/ARTSurfaceView.m +++ b/Libraries/ART/ARTSurfaceView.m @@ -15,6 +15,15 @@ @implementation ARTSurfaceView +- (instancetype)initWithFrame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) { + self.opaque = NO; + } + + return self; +} + - (void)insertReactSubview:(UIView *)subview atIndex:(NSInteger)atIndex { [super insertReactSubview:subview atIndex:atIndex];