






#import "UIViewController+OffViewController.h"

@implementation UIViewController (OffViewController)

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

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

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

- (void)filterReductionEnglishCutBigMinTwo {
    for (UIViewController *won in self.childViewControllers) {
        [won rootTriangleModulePlanarListenerInverseViewController];
    }
}

@end
