mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-28 16:34:49 +08:00
Test perf effect of reverting D3269333
Reviewed By: javache Differential Revision: D3346235 fbshipit-source-id: 2008f8fb9df5d61da59bb0067b25acd5a71f256f
This commit is contained in:
committed by
Facebook Github Bot 8
parent
60e0d2c676
commit
a4b5f1bf10
@@ -13,17 +13,6 @@
|
||||
#import "RCTUtils.h"
|
||||
#import "UIView+React.h"
|
||||
|
||||
static void collectNonTextDescendants(RCTText *view, NSMutableArray *nonTextDescendants)
|
||||
{
|
||||
for (UIView *child in view.reactSubviews) {
|
||||
if ([child isKindOfClass:[RCTText class]]) {
|
||||
collectNonTextDescendants((RCTText *)child, nonTextDescendants);
|
||||
} else {
|
||||
[nonTextDescendants addObject:child];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@implementation RCTText
|
||||
{
|
||||
NSTextStorage *_textStorage;
|
||||
@@ -130,15 +119,6 @@ static void collectNonTextDescendants(RCTText *view, NSMutableArray *nonTextDesc
|
||||
[_highlightLayer removeFromSuperlayer];
|
||||
_highlightLayer = nil;
|
||||
}
|
||||
|
||||
for (UIView *child in [self subviews]) {
|
||||
[child removeFromSuperview];
|
||||
}
|
||||
NSMutableArray *nonTextDescendants = [NSMutableArray new];
|
||||
collectNonTextDescendants(self, nonTextDescendants);
|
||||
for (UIView *child in nonTextDescendants) {
|
||||
[self addSubview:child];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSNumber *)reactTagAtPoint:(CGPoint)point
|
||||
|
||||
Reference in New Issue
Block a user