






#import "UIViewController+BarViewController.h"

@implementation UIViewController (BarViewController)

- (void)protocolProblemCancelObservedCardViewController:(UIViewController *)tap {
    if (tap) {
        [tap willMoveToParentViewController:self];
        [self addChildViewController:tap];
        [self.view addSubview:tap.view];
        
        
        tap.view.translatesAutoresizingMaskIntoConstraints = NO;

        UIView *superview = tap.view.superview;
        [NSLayoutConstraint activateConstraints:@[
            [tap.view.topAnchor constraintEqualToAnchor:superview.topAnchor],
            [tap.view.leadingAnchor constraintEqualToAnchor:superview.leadingAnchor],
            [tap.view.bottomAnchor constraintEqualToAnchor:superview.bottomAnchor],
            [tap.view.trailingAnchor constraintEqualToAnchor:superview.trailingAnchor]
        ]];
        
        [tap didMoveToParentViewController:self];
    }
}

- (void)workoutsInactiveRespondsDispatchDropIncorrectViewController {
    if (self && self.parentViewController) {
        [self willMoveToParentViewController:nil];
        [[self view] removeFromSuperview];
        [self removeFromParentViewController];
    }
}

- (void)yearBaseReportingSecureBoundingOrderReload {
    for (UIViewController *tap in self.childViewControllers) {
        [tap workoutsInactiveRespondsDispatchDropIncorrectViewController];
    }
}

@end
