mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 09:12:02 +00:00
336984214f
Summary: public Disabling background color propagation had the unexpected effect of turning ART views black. This diff re-enabled propagation for ART views. Reviewed By: jingc Differential Revision: D2816402 fb-gh-sync-id: f2a4c44f3b4a16e04cbf6051391bb8fb1c0a7ed2
36 lines
763 B
Objective-C
36 lines
763 B
Objective-C
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import "ARTSurfaceView.h"
|
|
|
|
#import "ARTNode.h"
|
|
#import "RCTLog.h"
|
|
|
|
@implementation ARTSurfaceView
|
|
|
|
- (void)invalidate
|
|
{
|
|
[self setNeedsDisplay];
|
|
}
|
|
|
|
- (void)drawRect:(CGRect)rect
|
|
{
|
|
CGContextRef context = UIGraphicsGetCurrentContext();
|
|
for (ARTNode *node in self.subviews) {
|
|
[node renderTo:context];
|
|
}
|
|
}
|
|
|
|
- (void)reactSetInheritedBackgroundColor:(UIColor *)inheritedBackgroundColor
|
|
{
|
|
self.backgroundColor = inheritedBackgroundColor;
|
|
}
|
|
|
|
@end
|