






#import "RetMoreShotViewController.h"
#import "SDWebImageManager.h"
#import "FarToast.h"
#import "NSString+Extension.h"

@interface RetMoreShotViewController ()

@property (nonatomic, strong) UIImageView *maxAutoBendImageView;
@property (nonatomic, strong) UITextField *weightAddTextField;
@property (nonatomic, strong) UITextField *bothBoxSortTextField;

@end

@implementation RetMoreShotViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.catAtomTryButton.hidden = [self.hisEllipsis[0] boolValue];
    
    CGFloat rollLingerLowerThreeSigma = PaceDownHue.absoluteAuto.kinTiedThird;
    
    UILabel *oddLabel = [PaceDownHue queueProblemShiftSilenceFitness:PaceDownHue.touchBusyMalay.hellmanBoundRedWasAvailable];
    oddLabel.numberOfLines = 0;
    [self.view addSubview:oddLabel];
    [oddLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(PaceDownHue.absoluteAuto.decryptedOne);
        make.left.mas_equalTo(PaceDownHue.absoluteAuto.tipPanRegion);
        make.right.mas_equalTo(-PaceDownHue.absoluteAuto.tipPanRegion);
    }];
    
    
    self.weightAddTextField = [PaceDownHue observeHintField:PaceDownHue.touchBusyMalay.endpointsPermittedCatNumeratorUnlearnBin isSecure:NO];
    [self.view addSubview:self.weightAddTextField];
    [self.weightAddTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(oddLabel.mas_bottom).offset(rollLingerLowerThreeSigma);
        make.left.mas_equalTo(PaceDownHue.absoluteAuto.queryButLine);
        make.right.mas_equalTo(-PaceDownHue.absoluteAuto.queryButLine);
        make.height.mas_equalTo(PaceDownHue.absoluteAuto.pitchLastEra);
    }];
    
    
    self.bothBoxSortTextField = [PaceDownHue observeHintField:PaceDownHue.touchBusyMalay.mildVariablesSeleniumNextFoundDrag isSecure:NO];;
    [self.view addSubview:self.bothBoxSortTextField];
    [self.bothBoxSortTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.weightAddTextField.mas_bottom).offset(rollLingerLowerThreeSigma);
        make.left.right.equalTo(self.weightAddTextField);
        make.height.mas_equalTo(PaceDownHue.absoluteAuto.pitchLastEra);
    }];
    
    
    UIImageView *oneTenImageView = nil;
    if ([self.hisEllipsis[1] length] > 0) {
        
        oneTenImageView = [[UIImageView alloc] init];
        oneTenImageView.backgroundColor = UIColor.lightGrayColor;
        oneTenImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:oneTenImageView];
        [oneTenImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.bothBoxSortTextField.mas_bottom).offset(rollLingerLowerThreeSigma);
            make.width.mas_equalTo(self.bothBoxSortTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.maxAutoBendImageView = oneTenImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.hisEllipsis[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(), ^{
                oneTenImageView.image = image2;
                CGFloat lossy = image2.size.height / image2.size.width;
                [oneTenImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((PaceDownHue.absoluteAuto.dietaryLostPinNewtonsSomaliWidth -PaceDownHue.absoluteAuto.queryButLine*2)*lossy);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.maxAutoBendImageView ? self.maxAutoBendImageView.frame.size.height + PaceDownHue.absoluteAuto.kinTiedThird +PaceDownHue.absoluteAuto.curlSumCloudFilmCancelledMagnitude : PaceDownHue.absoluteAuto.curlSumCloudFilmCancelledMagnitude;
                    
                    make.size.mas_equalTo(CGSizeMake(PaceDownHue.absoluteAuto.dietaryLostPinNewtonsSomaliWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.maxAutoBendImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.maxAutoBendImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *mightLostButton = [PaceDownHue issueSolidUnsafeRelevanceInsetColor:PaceDownHue.touchBusyMalay.cupFilterRemainingUnderlineDay];
    [mightLostButton addTarget:self action:@selector(abortedTatarRetPartiallyDelayBusy:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:mightLostButton];
    [mightLostButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-PaceDownHue.absoluteAuto.maxGigahertz);
        make.left.right.equalTo(self.weightAddTextField);
        make.height.mas_equalTo(PaceDownHue.absoluteAuto.youNapDerive);
    }];
    
}

- (void)abortedTatarRetPartiallyDelayBusy:(id)sender {

}

@end
