Skip to content

Commit

Permalink
Fixed black ARTSurfaceView
Browse files Browse the repository at this point in the history
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
  • Loading branch information
shergin authored and facebook-github-bot committed Dec 20, 2017
1 parent 6ad1f09 commit 5c8481e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Libraries/ART/ARTSurfaceView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 5c8481e

Please sign in to comment.