






#import "StreamsSwitchViewController.h"
#import "DocumentsManager.h"
#import "PinAlphaView.h"
#import "UIColor+PubColor.h"
#import "UIDevice+TopDevice.h"
#import "UIImage+HasImage.h"
#import "CyclingHisConfig.h"


@implementation StreamsSwitchViewController

- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = TooCloudSun.signExtensionLaterNotifyCompressUnlikely ? [UIColor roundSoloistSpectralLookupCopyrightSuggested:TooCloudSun.signExtensionLaterNotifyCompressUnlikely]:UIColor.whiteColor;

    self.shiftWhoSix = self.tablePanFor;
    [PinAlphaView bikeJoule];
    

    self.earRollDraw.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.earRollDraw mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(flushFlemish) name:TooCloudSun.seeFocusSlab.peopleSobRetryDateFarsiSymbolic object:nil];
}

- (void)flushFlemish {
    [self.earRollDraw reload];
}


- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self minSummariesYouChunkRestores];
}

//- (void)viewDidAppear:(BOOL)animated {


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([TooCloudSun lineHusbandSafariHelpLazyName] && CyclingHisConfig.shared.panExitsLanguagesLatencySun.hitBuddhist.napFloatMix) {
        [PinAlphaView cookieSix];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)orangeSumJobSize {
    UIWindow *mainPutWindow = [[DocumentsManager shared] errorClearedWindow];
    UIEdgeInsets safe = mainPutWindow.safeAreaInsets;
    CGFloat artistSquares = 0;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
#pragma clang diagnostic pop
    
    if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) {
        if (![UIDevice inspired] || [UIDevice sixPop]) {//无刘海
            artistSquares = UIScreen.mainScreen.bounds.size.height*TooCloudSun.jobAttitudeExtendNothingAny;
        }else {
            artistSquares = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*TooCloudSun.jobAttitudeExtendNothingAny;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, artistSquares);
        
    }else { 
        if (![UIDevice inspired] || [UIDevice sixPop]) {//无刘海
            artistSquares = UIScreen.mainScreen.bounds.size.width * TooCloudSun.jobAttitudeExtendNothingAny;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                artistSquares = (UIScreen.mainScreen.bounds.size.width - safe.left) * TooCloudSun.jobAttitudeExtendNothingAny;
            }else {
                artistSquares = (UIScreen.mainScreen.bounds.size.width - safe.right) * TooCloudSun.jobAttitudeExtendNothingAny;
            }
        }
        return CGSizeMake(artistSquares, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)minSummariesYouChunkRestores {
    UIWindow *mainPutWindow = [[DocumentsManager shared] errorClearedWindow];
    UIEdgeInsets safe = mainPutWindow.safeAreaInsets;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
#pragma clang diagnostic pop
    
    if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) {
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.orangeSumJobSize);
        }];
    }else {
        
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.mas_equalTo(0);
                make.left.mas_equalTo(safe.left);
                make.size.mas_equalTo(self.orangeSumJobSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.orangeSumJobSize);
            }];
        }
    }
}

- (void)stepTertiaryStakeBandObsolete:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [super stepTertiaryStakeBandObsolete:touches withEvent:event];
    [[DocumentsManager shared] acceptSiteKirghizNetSubSampleViewController:self.navigationController];
}

@end
