






#import "SinSobBikeOptViewController.h"
#import "DryToast.h"
#import "StaticInfo.h"

@interface SinSobBikeOptViewController ()

@property (nonatomic, strong) UIImageView *endInsideView;
@property (nonatomic, strong) UIButton *bridgingMapButton;
@property (nonatomic, strong) UIView *yellowSeeView;
@property (nonatomic, strong) UILabel *preventsLabel;
@property (nonatomic, strong) UITextField *ruleDispenseTextField;
@property (nonatomic, strong) UITextField *pickTipSheButTextField;
@end

@implementation SinSobBikeOptViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.opaqueHalfButton.hidden = YES;
    
    if ([StaticInfo smallerTrustedAndBitsEnvelopeImage]) {
        self.endInsideView = [[UIImageView alloc] initWithImage:[StaticInfo smallerTrustedAndBitsEnvelopeImage]];
        [self.view addSubview:self.endInsideView];
        self.endInsideView.hidden = YES;
        [self.endInsideView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(AlbumBoxSex.catalanHertz.haveThemeAre);
            make.left.equalTo(self.flushTradButton.mas_right);
            make.top.equalTo(self.view).offset(AlbumBoxSex.catalanHertz.subBypassFix);
        }];
    }
    
    self.yellowSeeView = [AlbumBoxSex yellowSeeView];
    self.yellowSeeView.hidden = YES;
    [self.view addSubview:self.yellowSeeView];
    [self.yellowSeeView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([StaticInfo smallerTrustedAndBitsEnvelopeImage]) {
            make.centerY.equalTo(self.endInsideView);
            make.left.equalTo(self.endInsideView.mas_right).offset(AlbumBoxSex.catalanHertz.hitProduces);
        }else {
            make.top.equalTo(self.view).offset(AlbumBoxSex.catalanHertz.subBypassFix);
            make.left.equalTo(self.flushTradButton.mas_right).offset(AlbumBoxSex.catalanHertz.hitProduces);
        }
        make.right.equalTo(self.opaqueHalfButton.mas_left);
        make.height.mas_equalTo(AlbumBoxSex.catalanHertz.haveThemeAre);
    }];
    
    self.preventsLabel = [AlbumBoxSex hitLiveShowersKannadaAir:AlbumBoxSex.topWaxTreeRole.wideMismatchBagSixteenAdopt];
    self.preventsLabel.numberOfLines = 0;
    [self.view addSubview:self.preventsLabel];
    [self.preventsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(AlbumBoxSex.catalanHertz.wayTotalUses);
        make.left.mas_equalTo(AlbumBoxSex.catalanHertz.resetSpaLast);
        make.right.mas_equalTo(-AlbumBoxSex.catalanHertz.resetSpaLast);
    }];
    
    
    self.ruleDispenseTextField = [AlbumBoxSex workflowSlideNumbersExceedsThreadedAccount];
    self.ruleDispenseTextField.enabled = NO;
    self.ruleDispenseTextField.text = self.eyeLostSink[AlbumBoxSex.catalanHertz.extendsWillName];
    [self restoresMessagingEnglishDefinedWaistPublisherView:self.ruleDispenseTextField text:AlbumBoxSex.topWaxTreeRole.notifiedSupportsDecryptedKerningBut];
    [self.view addSubview:self.ruleDispenseTextField];
    [self.ruleDispenseTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.preventsLabel.mas_bottom).offset(AlbumBoxSex.catalanHertz.workVoiceOff);
        make.left.mas_equalTo(AlbumBoxSex.catalanHertz.editorForHex);
        make.right.mas_equalTo(-AlbumBoxSex.catalanHertz.editorForHex);
        make.height.mas_equalTo(AlbumBoxSex.catalanHertz.revisionRain);
    }];
    
    
    self.pickTipSheButTextField = [AlbumBoxSex workflowSlideNumbersExceedsThreadedAccount];
    self.pickTipSheButTextField.enabled = NO;
    self.pickTipSheButTextField.text = self.eyeLostSink[AlbumBoxSex.catalanHertz.denseMidBoxKey];
    [self restoresMessagingEnglishDefinedWaistPublisherView:self.pickTipSheButTextField text:AlbumBoxSex.topWaxTreeRole.allocatorSemaphoreRemotelySuspendedVisible];
    [self.view addSubview:self.pickTipSheButTextField];
    [self.pickTipSheButTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.ruleDispenseTextField.mas_bottom).offset(AlbumBoxSex.catalanHertz.workVoiceOff);
        make.left.right.equalTo(self.ruleDispenseTextField);
        make.height.mas_equalTo(AlbumBoxSex.catalanHertz.revisionRain);
    }];
    
    
    UIButton *hashArrowButton = [AlbumBoxSex managerResultsExistingAscendingDefinedColor:AlbumBoxSex.topWaxTreeRole.typeArteryCopticRestingVerbose];
    [hashArrowButton addTarget:self action:@selector(waxTakeBuddhistAreInteractAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:hashArrowButton];
    [hashArrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.pickTipSheButTextField.mas_bottom).offset(AlbumBoxSex.catalanHertz.workVoiceOff);
        make.left.right.equalTo(self.pickTipSheButTextField);
        make.height.mas_equalTo(AlbumBoxSex.catalanHertz.haveThemeAre);
    }];
    
    
    self.bridgingMapButton = [AlbumBoxSex dingbatsBirthRowTamilPresses:AlbumBoxSex.topWaxTreeRole.outsidePrototypeYouAnotherPatchMaintain];
    [self.bridgingMapButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.bridgingMapButton addTarget:self action:@selector(drawOriginalAndSpokenHaveAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.bridgingMapButton];
    [self.bridgingMapButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(hashArrowButton.mas_bottom).offset(AlbumBoxSex.catalanHertz.wayCervical);
        make.centerX.equalTo(self.view);
    }];
}

- (void)restoresMessagingEnglishDefinedWaistPublisherView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(AlbumBoxSex.catalanHertz.haveThemeAre, AlbumBoxSex.catalanHertz.revisionRain)};
    UILabel *integral = [[UILabel alloc] initWithFrame:frame];
    integral.text = text;
    integral.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = integral;
}

- (void)drawOriginalAndSpokenHaveAction:(UIButton *)sender {
    [[PredicateManager shared] triggersRankObserverLyricistComparedCanViewController:self.navigationController];
}

- (void)waxTakeBuddhistAreInteractAction:(UIButton *)sender {
    sender.hidden = YES;
    self.preventsLabel.hidden = YES;
    self.yellowSeeView.hidden = NO;
    self.endInsideView.hidden = NO;
    self.bridgingMapButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(AlbumBoxSex.catalanHertz.lawBendRareSeedAnnotatedWidth, AlbumBoxSex.catalanHertz.placeVerticalTrustedOrangeCaseProvider-AlbumBoxSex.catalanHertz.thatFollower));
    }];
    [self.ruleDispenseTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.yellowSeeView.mas_bottom).offset(AlbumBoxSex.catalanHertz.workVoiceOff);
    }];
    [self.view layoutIfNeeded];
    
    BOOL brush = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:AlbumBoxSex.catalanHertz.fitReductionBedHeavyToleranceSphereObsolete];
    if (!brush) {
        self.opaqueHalfButton.hidden = NO;
        [MaxAlertView pastLawRevisionsProceedSpectralOcean:nil message:AlbumBoxSex.topWaxTreeRole.occurredEffortVeryRepairSample completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= AlbumBoxSex.catalanHertz.attachPutSin;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:splitLayoutPicturesReasonDetailedInserting:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image splitLayoutPicturesReasonDetailedInserting:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[PredicateManager shared] triggersRankObserverLyricistComparedCanViewController:self.navigationController];
        [DryToast goalWay:AlbumBoxSex.topWaxTreeRole.logoPrettyBuffersShortLink];
    }else {
        self.opaqueHalfButton.hidden = NO;
        [MaxAlertView pastLawRevisionsProceedSpectralOcean:nil message:AlbumBoxSex.topWaxTreeRole.occurredEffortVeryRepairSample completion:nil];
    }
}

@end
