






#import "QuoteCustomViewController.h"
#import "SDWebImageManager.h"
#import "AreToast.h"
#import "NSString+SliderSum.h"

@interface QuoteCustomViewController ()

@property (nonatomic, strong) UIImageView *daySliceYetImageView;
@property (nonatomic, strong) UITextField *flashSeedTextField;
@property (nonatomic, strong) UITextField *areaMailArtTextField;

@end

@implementation QuoteCustomViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.sonLockingButton.hidden = [self.wayLoadEast[0] boolValue];
    
    CGFloat unfocusedParserThatActionBar = CloudyPrice.resetEndsIts.napVariables;
    
    UILabel *putLabel = [CloudyPrice respondsRotorMonthAlongsideVariance:CloudyPrice.presentedIrish.leastTexturedButterflySpecialSynthesis];
    putLabel.numberOfLines = 0;
    [self.view addSubview:putLabel];
    [putLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(CloudyPrice.resetEndsIts.strokingEach);
        make.left.mas_equalTo(CloudyPrice.resetEndsIts.tryCreateYou);
        make.right.mas_equalTo(-CloudyPrice.resetEndsIts.tryCreateYou);
    }];
    
    
    self.flashSeedTextField = [CloudyPrice beatFillOldField:CloudyPrice.presentedIrish.plateDayHangWristWaitHue isSecure:NO];
    [self.view addSubview:self.flashSeedTextField];
    [self.flashSeedTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(putLabel.mas_bottom).offset(unfocusedParserThatActionBar);
        make.left.mas_equalTo(CloudyPrice.resetEndsIts.timeLevelWon);
        make.right.mas_equalTo(-CloudyPrice.resetEndsIts.timeLevelWon);
        make.height.mas_equalTo(CloudyPrice.resetEndsIts.popAdobeUsed);
    }];
    
    
    self.areaMailArtTextField = [CloudyPrice beatFillOldField:CloudyPrice.presentedIrish.midBayerMagicPublisherSliderCycling isSecure:NO];;
    [self.view addSubview:self.areaMailArtTextField];
    [self.areaMailArtTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.flashSeedTextField.mas_bottom).offset(unfocusedParserThatActionBar);
        make.left.right.equalTo(self.flashSeedTextField);
        make.height.mas_equalTo(CloudyPrice.resetEndsIts.popAdobeUsed);
    }];
    
    
    UIImageView *binTheImageView = nil;
    if ([self.wayLoadEast[1] length] > 0) {
        
        binTheImageView = [[UIImageView alloc] init];
        binTheImageView.backgroundColor = UIColor.lightGrayColor;
        binTheImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:binTheImageView];
        [binTheImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.areaMailArtTextField.mas_bottom).offset(unfocusedParserThatActionBar);
            make.width.mas_equalTo(self.areaMailArtTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.daySliceYetImageView = binTheImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.wayLoadEast[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(), ^{
                binTheImageView.image = image2;
                CGFloat paper = image2.size.height / image2.size.width;
                [binTheImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((CloudyPrice.resetEndsIts.tallReductionFollowerTemplateHelpersWidth -CloudyPrice.resetEndsIts.timeLevelWon*2)*paper);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.daySliceYetImageView ? self.daySliceYetImageView.frame.size.height + CloudyPrice.resetEndsIts.napVariables +CloudyPrice.resetEndsIts.qualitySonIllHusbandMicroTaps : CloudyPrice.resetEndsIts.qualitySonIllHusbandMicroTaps;
                    
                    make.size.mas_equalTo(CGSizeMake(CloudyPrice.resetEndsIts.tallReductionFollowerTemplateHelpersWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.daySliceYetImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.daySliceYetImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *herWeightButton = [CloudyPrice bridgedEpsilonReferenceLooseStrideColor:CloudyPrice.presentedIrish.deciliterReportsPositionsPostcardKilometer];
    [herWeightButton addTarget:self action:@selector(readableUnderlineDecibelArmourFathomsAnimate:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:herWeightButton];
    [herWeightButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-CloudyPrice.resetEndsIts.nowOwnerLong);
        make.left.right.equalTo(self.flashSeedTextField);
        make.height.mas_equalTo(CloudyPrice.resetEndsIts.noteTemplate);
    }];
    
}

- (void)readableUnderlineDecibelArmourFathomsAnimate:(id)sender {

}

@end
