Ported TabBarIOS to OSS and unified implementation

This commit is contained in:
Nick Lockwood
2015-03-05 16:36:41 -08:00
parent ab2537816f
commit fb2f063ef5
51 changed files with 1148 additions and 478 deletions

View File

@@ -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,