






#import "ButAnotherAgeViewController.h"
#import "NowToast.h"
#import "KitTagInfo.h"

@interface ButAnotherAgeViewController ()

@property (nonatomic, strong) UIImageView *megabytesView;
@property (nonatomic, strong) UIButton *relayNetBadButton;
@property (nonatomic, strong) UIView *redoLeastView;
@property (nonatomic, strong) UILabel *debuggerLabel;
@property (nonatomic, strong) UITextField *noiseSwedishTextField;
@property (nonatomic, strong) UITextField *drumMiterHeadTextField;
@end

@implementation ButAnotherAgeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.voiceClockButton.hidden = YES;
    
    if ([KitTagInfo peerNegativeStalledContentsPrintImage]) {
        self.megabytesView = [[UIImageView alloc] initWithImage:[KitTagInfo peerNegativeStalledContentsPrintImage]];
        [self.view addSubview:self.megabytesView];
        self.megabytesView.hidden = YES;
        [self.megabytesView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(BestSharpen.didNapCoptic.oldTextPrint);
            make.left.equalTo(self.bevelTapsButton.mas_right);
            make.top.equalTo(self.view).offset(BestSharpen.didNapCoptic.tryPromptWet);
        }];
    }
    
    self.redoLeastView = [BestSharpen redoLeastView];
    self.redoLeastView.hidden = YES;
    [self.view addSubview:self.redoLeastView];
    [self.redoLeastView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([KitTagInfo peerNegativeStalledContentsPrintImage]) {
            make.centerY.equalTo(self.megabytesView);
            make.left.equalTo(self.megabytesView.mas_right).offset(BestSharpen.didNapCoptic.eggPanGuide);
        }else {
            make.top.equalTo(self.view).offset(BestSharpen.didNapCoptic.tryPromptWet);
            make.left.equalTo(self.bevelTapsButton.mas_right).offset(BestSharpen.didNapCoptic.eggPanGuide);
        }
        make.right.equalTo(self.voiceClockButton.mas_left);
        make.height.mas_equalTo(BestSharpen.didNapCoptic.oldTextPrint);
    }];
    
    self.debuggerLabel = [BestSharpen phonogramCourseCosmicMessagingFallback:BestSharpen.hangFillerPick.helloAnchorStreamFrameRate];
    self.debuggerLabel.numberOfLines = 0;
    [self.view addSubview:self.debuggerLabel];
    [self.debuggerLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(BestSharpen.didNapCoptic.kinRunUptime);
        make.left.mas_equalTo(BestSharpen.didNapCoptic.breakSobKeys);
        make.right.mas_equalTo(-BestSharpen.didNapCoptic.breakSobKeys);
    }];
    
    
    self.noiseSwedishTextField = [BestSharpen lemmaFingerAndTamilSignerAccount];
    self.noiseSwedishTextField.enabled = NO;
    self.noiseSwedishTextField.text = self.tenHitError[BestSharpen.didNapCoptic.hallTornadoName];
    [self cloudCursorAndLaunchEraTooView:self.noiseSwedishTextField text:BestSharpen.hangFillerPick.eggShowCurlCorrectedThumbnail];
    [self.view addSubview:self.noiseSwedishTextField];
    [self.noiseSwedishTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.debuggerLabel.mas_bottom).offset(BestSharpen.didNapCoptic.kitShapeBits);
        make.left.mas_equalTo(BestSharpen.didNapCoptic.polarBothSub);
        make.right.mas_equalTo(-BestSharpen.didNapCoptic.polarBothSub);
        make.height.mas_equalTo(BestSharpen.didNapCoptic.extendsHours);
    }];
    
    
    self.drumMiterHeadTextField = [BestSharpen lemmaFingerAndTamilSignerAccount];
    self.drumMiterHeadTextField.enabled = NO;
    self.drumMiterHeadTextField.text = self.tenHitError[BestSharpen.didNapCoptic.walkUnlearnKey];
    [self cloudCursorAndLaunchEraTooView:self.drumMiterHeadTextField text:BestSharpen.hangFillerPick.sinShowLookupTooNordic];
    [self.view addSubview:self.drumMiterHeadTextField];
    [self.drumMiterHeadTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.noiseSwedishTextField.mas_bottom).offset(BestSharpen.didNapCoptic.kitShapeBits);
        make.left.right.equalTo(self.noiseSwedishTextField);
        make.height.mas_equalTo(BestSharpen.didNapCoptic.extendsHours);
    }];
    
    
    UIButton *actualSumButton = [BestSharpen idiomBikeNineRebusEmailColor:BestSharpen.hangFillerPick.inspiredPurchasedIdenticalDeepGravity];
    [actualSumButton addTarget:self action:@selector(bracketedHardGreatReversingPendingAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:actualSumButton];
    [actualSumButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.drumMiterHeadTextField.mas_bottom).offset(BestSharpen.didNapCoptic.kitShapeBits);
        make.left.right.equalTo(self.drumMiterHeadTextField);
        make.height.mas_equalTo(BestSharpen.didNapCoptic.oldTextPrint);
    }];
    
    
    self.relayNetBadButton = [BestSharpen jobRemovalFiveTropicalMouse:BestSharpen.hangFillerPick.undoneToggleForceBoyfriendTagAscent];
    [self.relayNetBadButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.relayNetBadButton addTarget:self action:@selector(cornersManVisitFeatFloatingAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.relayNetBadButton];
    [self.relayNetBadButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(actualSumButton.mas_bottom).offset(BestSharpen.didNapCoptic.serbianRace);
        make.centerX.equalTo(self.view);
    }];
}

- (void)cloudCursorAndLaunchEraTooView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(BestSharpen.didNapCoptic.oldTextPrint, BestSharpen.didNapCoptic.extendsHours)};
    UILabel *otherNot = [[UILabel alloc] initWithFrame:frame];
    otherNot.text = text;
    otherNot.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = otherNot;
}

- (void)cornersManVisitFeatFloatingAction:(UIButton *)sender {
    [[ResetCurlManager shared] mightZipEvictionGoldenAnimateNoticeViewController:self.navigationController];
}

- (void)bracketedHardGreatReversingPendingAction:(UIButton *)sender {
    sender.hidden = YES;
    self.debuggerLabel.hidden = YES;
    self.redoLeastView.hidden = NO;
    self.megabytesView.hidden = NO;
    self.relayNetBadButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(BestSharpen.didNapCoptic.hectaresLowercaseInterlaceEndpointsKeysWidth, BestSharpen.didNapCoptic.traveledNowFactoriesIncludesYearSurge-BestSharpen.didNapCoptic.obscuredSame));
    }];
    [self.noiseSwedishTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.redoLeastView.mas_bottom).offset(BestSharpen.didNapCoptic.kitShapeBits);
    }];
    [self.view layoutIfNeeded];
    
    BOOL splat = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:BestSharpen.didNapCoptic.lessWayPortGoalTryContainsPong];
    if (!splat) {
        self.voiceClockButton.hidden = NO;
        [SheAlertView affectingSurrogateGrandauntPrioritySlantAnnotated:nil message:BestSharpen.hangFillerPick.bagBigWaistDestroyInside completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= BestSharpen.didNapCoptic.wasTagLaunch;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:martialExecutorCanceledWarpEntitledFocused:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image martialExecutorCanceledWarpEntitledFocused:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[ResetCurlManager shared] mightZipEvictionGoldenAnimateNoticeViewController:self.navigationController];
        [NowToast hisOpen:BestSharpen.hangFillerPick.sheLooseFiltersNoteInitiated];
    }else {
        self.voiceClockButton.hidden = NO;
        [SheAlertView affectingSurrogateGrandauntPrioritySlantAnnotated:nil message:BestSharpen.hangFillerPick.bagBigWaistDestroyInside completion:nil];
    }
}

@end
