mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-12 03:35:30 +08:00
Ported TabBarIOS to OSS and unified implementation
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#import "RCTAutoInsetsProtocol.h"
|
||||
#import "RCTConvert.h"
|
||||
#import "RCTLog.h"
|
||||
#import "UIView+ReactKit.h"
|
||||
|
||||
static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
|
||||
{
|
||||
@@ -23,15 +24,6 @@ static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
|
||||
|
||||
@implementation RCTView
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
_pointerEvents = RCTPointerEventsUnspecified;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *)accessibilityLabel
|
||||
{
|
||||
if (super.accessibilityLabel) {
|
||||
@@ -108,19 +100,10 @@ static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
|
||||
}
|
||||
}
|
||||
|
||||
+ (UIViewController *)backingViewControllerForView:(UIView *)view
|
||||
{
|
||||
id responder = [view nextResponder];
|
||||
if ([responder isKindOfClass:[UIViewController class]]) {
|
||||
return responder;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
+ (UIEdgeInsets)contentInsetsForView:(UIView *)view
|
||||
{
|
||||
while (view) {
|
||||
UIViewController *controller = [self backingViewControllerForView:view];
|
||||
UIViewController *controller = view.backingViewController;
|
||||
if (controller) {
|
||||
return (UIEdgeInsets){
|
||||
controller.topLayoutGuide.length, 0,
|
||||
|
||||
Reference in New Issue
Block a user