






#import "HangPanFaxWhoViewController.h"
#import "TimeClaimManager.h"
#import "RollLessView.h"
#import "UIColor+NetColor.h"
#import "UIDevice+MenDevice.h"
#import "UIImage+FitImage.h"
#import "SockInviteConfig.h"


@implementation HangPanFaxWhoViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = FeedSunTied.concertSecondLoudWasIntervalsLargest ? [UIColor selectorsSecretEarPastExitsTip:FeedSunTied.concertSecondLoudWasIntervalsLargest]:UIColor.whiteColor;

    self.getWideStay = self.feedFairArm;
    [RollLessView taggerPut];
    

    self.stoodPutSub.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.stoodPutSub mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(detailNowMid) name:FeedSunTied.rootIntegral.featBeatJoiningCapacityAspectJump object:nil];
}

- (void)detailNowMid {
    [self.stoodPutSub reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([FeedSunTied dismissImageEveryFamilyPersonalName] && SockInviteConfig.shared.toleranceForceDistinctDitherProgram.tryReverses.splatBounce) {
        [RollLessView headphone];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)visitedGreekSize {
    UIWindow *encryptWindow = [[TimeClaimManager shared] fourInspiredWindow];
    UIEdgeInsets safe = encryptWindow.safeAreaInsets;
    CGFloat basalFullyOne = 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 european] || [UIDevice bagTab]) {//无刘海
            basalFullyOne = UIScreen.mainScreen.bounds.size.height*FeedSunTied.appendChestUnboundRoomScrolled;
        }else {
            basalFullyOne = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*FeedSunTied.appendChestUnboundRoomScrolled;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, basalFullyOne);
        
    }else { 
        if (![UIDevice european] || [UIDevice bagTab]) {//无刘海
            basalFullyOne = UIScreen.mainScreen.bounds.size.width * FeedSunTied.appendChestUnboundRoomScrolled;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                basalFullyOne = (UIScreen.mainScreen.bounds.size.width - safe.left) * FeedSunTied.appendChestUnboundRoomScrolled;
            }else {
                basalFullyOne = (UIScreen.mainScreen.bounds.size.width - safe.right) * FeedSunTied.appendChestUnboundRoomScrolled;
            }
        }
        return CGSizeMake(basalFullyOne, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)purchasedFillFalloffTruncatedTurkmen {
    UIWindow *encryptWindow = [[TimeClaimManager shared] fourInspiredWindow];
    UIEdgeInsets safe = encryptWindow.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.visitedGreekSize);
        }];
    }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.visitedGreekSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.visitedGreekSize);
            }];
        }
    }
}

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

@end
