






#import "UIViewController+TabViewController.h"

@implementation UIViewController (TabViewController)

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

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

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

- (void)airExactEyePartlyDeriveLegibleProlog {
    for (UIViewController *dog in self.childViewControllers) {
        [dog renewPlaceSucceededActionSayUsesViewController];
    }
}

@end
