






#import "RedInuitOldViewController.h"
#import "SDWebImageManager.h"
#import "SinToast.h"
#import "NSString+TwoPhotos.h"

@interface RedInuitOldViewController ()

@property (nonatomic, strong) UIImageView *snapBeaconsImageView;
@property (nonatomic, strong) UITextField *tableKeysTextField;
@property (nonatomic, strong) UITextField *hitNapShelfTextField;

@end

@implementation RedInuitOldViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.skipAllUseButton.hidden = [self.grandsonPop[0] boolValue];
    
    CGFloat programAttributeSaltReorderAdaptive = PintResting.findClickCat.weekBlendTap;
    
    UILabel *seeLabel = [PintResting kannadaDanceCommandEditMemory:PintResting.exposeLeapAuto.metadataMoleDecimalPreferredCaret];
    seeLabel.numberOfLines = 0;
    [self.view addSubview:seeLabel];
    [seeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(PintResting.findClickCat.spouseAnswer);
        make.left.mas_equalTo(PintResting.findClickCat.advanceValue);
        make.right.mas_equalTo(-PintResting.findClickCat.advanceValue);
    }];
    
    
    self.tableKeysTextField = [PintResting twelveMinorField:PintResting.exposeLeapAuto.liftMotionReplyTowerRowDisplays isSecure:NO];
    [self.view addSubview:self.tableKeysTextField];
    [self.tableKeysTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(seeLabel.mas_bottom).offset(programAttributeSaltReorderAdaptive);
        make.left.mas_equalTo(PintResting.findClickCat.redSeasonFax);
        make.right.mas_equalTo(-PintResting.findClickCat.redSeasonFax);
        make.height.mas_equalTo(PintResting.findClickCat.capHybridAre);
    }];
    
    
    self.hitNapShelfTextField = [PintResting twelveMinorField:PintResting.exposeLeapAuto.countingBufferedVitaminWhoConcludeHint isSecure:NO];;
    [self.view addSubview:self.hitNapShelfTextField];
    [self.hitNapShelfTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tableKeysTextField.mas_bottom).offset(programAttributeSaltReorderAdaptive);
        make.left.right.equalTo(self.tableKeysTextField);
        make.height.mas_equalTo(PintResting.findClickCat.capHybridAre);
    }];
    
    
    UIImageView *theSonImageView = nil;
    if ([self.grandsonPop[1] length] > 0) {
        
        theSonImageView = [[UIImageView alloc] init];
        theSonImageView.backgroundColor = UIColor.lightGrayColor;
        theSonImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:theSonImageView];
        [theSonImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.hitNapShelfTextField.mas_bottom).offset(programAttributeSaltReorderAdaptive);
            make.width.mas_equalTo(self.hitNapShelfTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.snapBeaconsImageView = theSonImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.grandsonPop[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(), ^{
                theSonImageView.image = image2;
                CGFloat trait = image2.size.height / image2.size.width;
                [theSonImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((PintResting.findClickCat.primaryBandCanonSuccessFixWidth -PintResting.findClickCat.redSeasonFax*2)*trait);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.snapBeaconsImageView ? self.snapBeaconsImageView.frame.size.height + PintResting.findClickCat.weekBlendTap +PintResting.findClickCat.detectedAddConvertJustSnapBig : PintResting.findClickCat.detectedAddConvertJustSnapBig;
                    
                    make.size.mas_equalTo(CGSizeMake(PintResting.findClickCat.primaryBandCanonSuccessFixWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.snapBeaconsImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.snapBeaconsImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *preservesButton = [PintResting serbianManInvokeSnapshotTwelveColor:PintResting.exposeLeapAuto.fileLittleMaxTruncateSpa];
    [preservesButton addTarget:self action:@selector(broadcastMantissaZipOneMillReject:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:preservesButton];
    [preservesButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-PintResting.findClickCat.criteriaFont);
        make.left.right.equalTo(self.tableKeysTextField);
        make.height.mas_equalTo(PintResting.findClickCat.artThousands);
    }];
    
}

- (void)broadcastMantissaZipOneMillReject:(id)sender {

}

@end
