






#import "MostClickWordViewController.h"
#import "RingMiterManager.h"
#import "AchievedView.h"
#import "UIColor+AgeColor.h"
#import "UIDevice+DueDevice.h"
#import "UIImage+ItsImage.h"
#import "MidArePlusConfig.h"


@implementation MostClickWordViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = CloudyPrice.internetLiftAudienceReachablePatchSpeed ? [UIColor boostDomainsEnteredOurWalkRed:CloudyPrice.internetLiftAudienceReachablePatchSpeed]:UIColor.whiteColor;

    self.shareMidPop = self.wayLoadEast;
    [AchievedView hashEnter];
    

    self.easyCompile.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.easyCompile mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(likeCloudHit) name:CloudyPrice.resetEndsIts.maskDecomposeEstimateLengthsObtainUpdate object:nil];
}

- (void)likeCloudHit {
    [self.easyCompile reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([CloudyPrice decoderNearbyInhalerHowRedirectName] && MidArePlusConfig.shared.adjustedSizeEstimatedOnlySpace.askSerifNow.farFlushSex) {
        [AchievedView degreeFar];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)burnExactPutSize {
    UIWindow *areaYouWindow = [[RingMiterManager shared] daughtersCutWindow];
    UIEdgeInsets safe = areaYouWindow.safeAreaInsets;
    CGFloat bestHelloText = 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 wrongAnd] || [UIDevice tremor]) {//无刘海
            bestHelloText = UIScreen.mainScreen.bounds.size.height*CloudyPrice.specifiedMegawattsCountedClockBarriers;
        }else {
            bestHelloText = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*CloudyPrice.specifiedMegawattsCountedClockBarriers;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, bestHelloText);
        
    }else { 
        if (![UIDevice wrongAnd] || [UIDevice tremor]) {//无刘海
            bestHelloText = UIScreen.mainScreen.bounds.size.width * CloudyPrice.specifiedMegawattsCountedClockBarriers;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                bestHelloText = (UIScreen.mainScreen.bounds.size.width - safe.left) * CloudyPrice.specifiedMegawattsCountedClockBarriers;
            }else {
                bestHelloText = (UIScreen.mainScreen.bounds.size.width - safe.right) * CloudyPrice.specifiedMegawattsCountedClockBarriers;
            }
        }
        return CGSizeMake(bestHelloText, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)rankedOneReversedLearnRealm {
    UIWindow *areaYouWindow = [[RingMiterManager shared] daughtersCutWindow];
    UIEdgeInsets safe = areaYouWindow.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.burnExactPutSize);
        }];
    }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.burnExactPutSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.burnExactPutSize);
            }];
        }
    }
}

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

@end
