






#import "LogoOutEndFatViewController.h"
#import "BalticFixManager.h"
#import "HomeSeedView.h"
#import "UIColor+FunColor.h"
#import "UIDevice+ForDevice.h"
#import "UIImage+EndImage.h"
#import "ArteryPlugConfig.h"


@implementation LogoOutEndFatViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = BinFaxEight.localityBackupControlProgressBoundReversed ? [UIColor voiceAggregateSlashesSeasonMouthStarting:BinFaxEight.localityBackupControlProgressBoundReversed]:UIColor.whiteColor;

    self.serbianView = self.givenBarRet;
    [HomeSeedView bookMedia];
    

    self.penAssembly.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.penAssembly mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(concertPitch) name:BinFaxEight.icyAboutDrum.slovakMidShortcutsSeparatedGetSub object:nil];
}

- (void)concertPitch {
    [self.penAssembly reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([BinFaxEight legibleUnknownRightMindfulPostalName] && ArteryPlugConfig.shared.secondsDuplicatePatternComposeClinical.earEmbedded.presentLoop) {
        [HomeSeedView cellphone];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)penThatWaterSize {
    UIWindow *winCaseWindow = [[BalticFixManager shared] plateSuchRetWindow];
    UIEdgeInsets safe = winCaseWindow.safeAreaInsets;
    CGFloat descendedArea = 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 peerWeek] || [UIDevice sexFit]) {//无刘海
            descendedArea = UIScreen.mainScreen.bounds.size.height*BinFaxEight.ascentTryMalayDerivedBin;
        }else {
            descendedArea = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*BinFaxEight.ascentTryMalayDerivedBin;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, descendedArea);
        
    }else { 
        if (![UIDevice peerWeek] || [UIDevice sexFit]) {//无刘海
            descendedArea = UIScreen.mainScreen.bounds.size.width * BinFaxEight.ascentTryMalayDerivedBin;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                descendedArea = (UIScreen.mainScreen.bounds.size.width - safe.left) * BinFaxEight.ascentTryMalayDerivedBin;
            }else {
                descendedArea = (UIScreen.mainScreen.bounds.size.width - safe.right) * BinFaxEight.ascentTryMalayDerivedBin;
            }
        }
        return CGSizeMake(descendedArea, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)commentsFriendSegmentGramPolicy {
    UIWindow *winCaseWindow = [[BalticFixManager shared] plateSuchRetWindow];
    UIEdgeInsets safe = winCaseWindow.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.penThatWaterSize);
        }];
    }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.penThatWaterSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.penThatWaterSize);
            }];
        }
    }
}

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

@end
