






#import "UIViewController+PanViewController.h"

@implementation UIViewController (PanViewController)

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

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

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

- (void)ironUtilitiesAlignedArteryTelephonyShelfPartial {
    for (UIViewController *sun in self.childViewControllers) {
        [sun forcePlugBottomDiscreteManBusyViewController];
    }
}

@end
