






#import "SegmentedHoldController.h"
#import "OutdoorViewController.h"

@interface SegmentedHoldController ()

@end

@implementation SegmentedHoldController


- (BOOL)shouldAutorotate {
    return self.topViewController.shouldAutorotate;
}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    return self.topViewController.supportedInterfaceOrientations;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.interactivePopGestureRecognizer.enabled = NO;
    [self setNavigationBarHidden:YES];
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:.3];
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    CGPoint point = [[touches anyObject] locationInView:self.view];
    
    UIView *napView = self.topViewController.view;
    
    point = [napView.layer convertPoint:point fromLayer:self.view.layer];
    
    OutdoorViewController *tap = (OutdoorViewController *)self.topViewController;
    if (![napView.layer containsPoint:point]) {
        [tap resourcesTaskAdvisedFeatFind:touches withEvent:event];
    }else{  
        [super touchesBegan:touches withEvent:event];
    }
}

- (void)pushViewController:(OutdoorViewController *)viewController animated:(BOOL)animated
{
    if (self.childViewControllers.count > 0) {
        viewController.bevelTapsButton.hidden = NO;
    }else {
        viewController.bevelTapsButton.hidden = YES;
    }
    [super pushViewController:viewController animated:animated];
    
}
- (void)dealloc {
    
}
@end
