






#import "OverHisNotButController.h"
#import "CarPeerViewController.h"

@interface OverHisNotButController ()

@end

@implementation OverHisNotButController


- (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 *lawView = self.topViewController.view;
    
    point = [lawView.layer convertPoint:point fromLayer:self.view.layer];
    
    CarPeerViewController *our = (CarPeerViewController *)self.topViewController;
    if (![lawView.layer containsPoint:point]) {
        [our neutralAgentPositionCyrillicStarted:touches withEvent:event];
    }else{  
        [super touchesBegan:touches withEvent:event];
    }
}

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