






#import "PopSobPlusFunViewController.h"
#import "CoverTimeManager.h"
#import "RoleMealView.h"
#import "UIColor+KeyColor.h"
#import "UIDevice+FatDevice.h"
#import "UIImage+SeeImage.h"
#import "PortCutterConfig.h"


@implementation PopSobPlusFunViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = ScrollDatum.rotationGeneratesPreservedMacintoshPressesExpected ? [UIColor laotianEventualCombinedPreparedMutationThat:ScrollDatum.rotationGeneratesPreservedMacintoshPressesExpected]:UIColor.whiteColor;

    self.notKitBreak = self.bringSixBar;
    [RoleMealView simulates];
    

    self.barSheetBar.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.barSheetBar mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(thatAreSigma) name:ScrollDatum.tildeStopHit.raiseIssueLowSplitParameterEither object:nil];
}

- (void)thatAreSigma {
    [self.barSheetBar reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([ScrollDatum courseYiddishHeightIdenticalBorderName] && PortCutterConfig.shared.providersTrackWayDistinctBackup.tapsToolFix.plugNameMid) {
        [RoleMealView runFinish];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)highNotParseSize {
    UIWindow *playArmWindow = [[CoverTimeManager shared] hoverRunningWindow];
    UIEdgeInsets safe = playArmWindow.safeAreaInsets;
    CGFloat indicesReduce = 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 fixWhile] || [UIDevice hueCut]) {//无刘海
            indicesReduce = UIScreen.mainScreen.bounds.size.height*ScrollDatum.colleagueSectionTeacherCharacterSolutions;
        }else {
            indicesReduce = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*ScrollDatum.colleagueSectionTeacherCharacterSolutions;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, indicesReduce);
        
    }else { 
        if (![UIDevice fixWhile] || [UIDevice hueCut]) {//无刘海
            indicesReduce = UIScreen.mainScreen.bounds.size.width * ScrollDatum.colleagueSectionTeacherCharacterSolutions;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                indicesReduce = (UIScreen.mainScreen.bounds.size.width - safe.left) * ScrollDatum.colleagueSectionTeacherCharacterSolutions;
            }else {
                indicesReduce = (UIScreen.mainScreen.bounds.size.width - safe.right) * ScrollDatum.colleagueSectionTeacherCharacterSolutions;
            }
        }
        return CGSizeMake(indicesReduce, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)uploadedProducesAskOnlineCollision {
    UIWindow *playArmWindow = [[CoverTimeManager shared] hoverRunningWindow];
    UIEdgeInsets safe = playArmWindow.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.highNotParseSize);
        }];
    }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.highNotParseSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.highNotParseSize);
            }];
        }
    }
}

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

@end
