






#import "UIViewController+SpaViewController.h"

@implementation UIViewController (SpaViewController)

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

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

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

- (void)petiteChangeSiblingsInsidePublisherWithinConfigure {
    for (UIViewController *spa in self.childViewControllers) {
        [spa learnedCentralsUniformArmourBuildProposalViewController];
    }
}

@end
