mirror of
https://github.com/status-im/react-native.git
synced 2025-02-24 15:18:10 +00:00
Fixed ART views
Summary: Fixed ART views, which were broken by the zIndex diff Reviewed By: wwjholmes Differential Revision: D3403679 fbshipit-source-id: cc3cdccd19c21223ce6bddeda3d914937ecb73b6
This commit is contained in:
parent
b29c938312
commit
b0fed416cb
@ -7,8 +7,7 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "UIView+React.h"
|
||||
|
||||
/**
|
||||
* ART nodes are implemented as empty UIViews but this is just an implementation detail to fit
|
||||
|
@ -13,16 +13,22 @@
|
||||
|
||||
@implementation ARTNode
|
||||
|
||||
- (void)insertSubview:(UIView *)subview atIndex:(NSInteger)index
|
||||
- (void)insertReactSubview:(UIView *)subview atIndex:(NSInteger)atIndex
|
||||
{
|
||||
[super insertReactSubview:subview atIndex:atIndex];
|
||||
[self insertSubview:subview atIndex:atIndex];
|
||||
[self invalidate];
|
||||
[super insertSubview:subview atIndex:index];
|
||||
}
|
||||
|
||||
- (void)removeFromSuperview
|
||||
- (void)removeReactSubview:(UIView *)subview
|
||||
{
|
||||
[super removeReactSubview:subview];
|
||||
[self invalidate];
|
||||
[super removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)didUpdateReactSubviews
|
||||
{
|
||||
// Do nothing, as subviews are inserted by insertReactSubview:
|
||||
}
|
||||
|
||||
- (void)setOpacity:(CGFloat)opacity
|
||||
|
@ -14,6 +14,24 @@
|
||||
|
||||
@implementation ARTSurfaceView
|
||||
|
||||
- (void)insertReactSubview:(UIView *)subview atIndex:(NSInteger)atIndex
|
||||
{
|
||||
[super insertReactSubview:subview atIndex:atIndex];
|
||||
[self insertSubview:subview atIndex:atIndex];
|
||||
[self invalidate];
|
||||
}
|
||||
|
||||
- (void)removeReactSubview:(UIView *)subview
|
||||
{
|
||||
[super removeReactSubview:subview];
|
||||
[self invalidate];
|
||||
}
|
||||
|
||||
- (void)didUpdateReactSubviews
|
||||
{
|
||||
// Do nothing, as subviews are inserted by insertReactSubview:
|
||||
}
|
||||
|
||||
- (void)invalidate
|
||||
{
|
||||
[self setNeedsDisplay];
|
||||
|
Loading…
x
Reference in New Issue
Block a user