






#import "LogNineHeadViewController.h"
#import "SDWebImageManager.h"
#import "WetToast.h"
#import "NSString+Aggregate.h"

@interface LogNineHeadViewController ()

@property (nonatomic, strong) UIImageView *getUsesFindImageView;
@property (nonatomic, strong) UITextField *userClaimTextField;
@property (nonatomic, strong) UITextField *stringBuildTextField;

@end

@implementation LogNineHeadViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.adjustSuchButton.hidden = [self.tryGreekEnd[0] boolValue];
    
    CGFloat searchHexAdaptorPhotosProposal = PrintFarFor.guideMaySelf.storeMutable;
    
    UILabel *redLabel = [PrintFarFor complexSolutionsDaysSuchKazakh:PrintFarFor.tempSockJobHas.activeLoopsDeferredTopTap];
    redLabel.numberOfLines = 0;
    [self.view addSubview:redLabel];
    [redLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(PrintFarFor.guideMaySelf.expandingIts);
        make.left.mas_equalTo(PrintFarFor.guideMaySelf.staleOddJoin);
        make.right.mas_equalTo(-PrintFarFor.guideMaySelf.staleOddJoin);
    }];
    
    
    self.userClaimTextField = [PrintFarFor pressVisionField:PrintFarFor.tempSockJobHas.retainedOrderingValidityTheArmourMay isSecure:NO];
    [self.view addSubview:self.userClaimTextField];
    [self.userClaimTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(redLabel.mas_bottom).offset(searchHexAdaptorPhotosProposal);
        make.left.mas_equalTo(PrintFarFor.guideMaySelf.bagShotEqual);
        make.right.mas_equalTo(-PrintFarFor.guideMaySelf.bagShotEqual);
        make.height.mas_equalTo(PrintFarFor.guideMaySelf.bikeSurgeBin);
    }];
    
    
    self.stringBuildTextField = [PrintFarFor pressVisionField:PrintFarFor.tempSockJobHas.croppingBypassedSumMalayShoulderOrder isSecure:NO];;
    [self.view addSubview:self.stringBuildTextField];
    [self.stringBuildTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.userClaimTextField.mas_bottom).offset(searchHexAdaptorPhotosProposal);
        make.left.right.equalTo(self.userClaimTextField);
        make.height.mas_equalTo(PrintFarFor.guideMaySelf.bikeSurgeBin);
    }];
    
    
    UIImageView *genderImageView = nil;
    if ([self.tryGreekEnd[1] length] > 0) {
        
        genderImageView = [[UIImageView alloc] init];
        genderImageView.backgroundColor = UIColor.lightGrayColor;
        genderImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:genderImageView];
        [genderImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.stringBuildTextField.mas_bottom).offset(searchHexAdaptorPhotosProposal);
            make.width.mas_equalTo(self.stringBuildTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.getUsesFindImageView = genderImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.tryGreekEnd[1]] options:0 progress:nil completed:^(UIImage * _Nullable image2, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
            dispatch_async(dispatch_get_main_queue(), ^{
                genderImageView.image = image2;
                CGFloat prime = image2.size.height / image2.size.width;
                [genderImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((PrintFarFor.guideMaySelf.digitalFinalBuffersSectionGreaterWidth -PrintFarFor.guideMaySelf.bagShotEqual*2)*prime);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.getUsesFindImageView ? self.getUsesFindImageView.frame.size.height + PrintFarFor.guideMaySelf.storeMutable +PrintFarFor.guideMaySelf.collisionEnergySpacingDownloadPortBed : PrintFarFor.guideMaySelf.collisionEnergySpacingDownloadPortBed;
                    
                    make.size.mas_equalTo(CGSizeMake(PrintFarFor.guideMaySelf.digitalFinalBuffersSectionGreaterWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.getUsesFindImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.getUsesFindImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *sixVerifyButton = [PrintFarFor entityBlurDogBestDisablesColor:PrintFarFor.tempSockJobHas.oldFrequencyDanceRowsQuality];
    [sixVerifyButton addTarget:self action:@selector(copperCurlSystolicIllMarginFat:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:sixVerifyButton];
    [sixVerifyButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-PrintFarFor.guideMaySelf.binSentPress);
        make.left.right.equalTo(self.userClaimTextField);
        make.height.mas_equalTo(PrintFarFor.guideMaySelf.thickChapter);
    }];
    
}

- (void)copperCurlSystolicIllMarginFat:(id)sender {

}

@end
