






#import "CupOverRowsPutButton.h"
#import "BinFaxEight.h"
#import "UIImage+EndImage.h"
#import "NearFractionsController.h"
#import "UIImage+EndImage.h"
#import "UIColor+FunColor.h"

@implementation CupOverRowsPutButton

- (instancetype)initItalianDenyViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.hashUpperRowViewController = viewController;
        [self shortSmartColorSkinAutomatic];
    }
    return self;
}


- (void)shortSmartColorSkinAutomatic {
    
    NSArray *tabMinorCategoryLocationFinishing = [FreeDescribesArmpitLossyBox climbingItemSendQuantizeLaunch:[AirHighJob class]];
    
    
    NSString *impactDoneWakeCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block AirHighJob *ratioPinchQuit = nil;
    [tabMinorCategoryLocationFinishing enumerateObjectsUsingBlock:^(AirHighJob *country, NSUInteger idx, BOOL *stop) {
        if ([country.snapJobResetCode caseInsensitiveCompare:impactDoneWakeCode] == NSOrderedSame) {
            ratioPinchQuit = country;
            *stop = YES; 
        }
    }];
    self.warpStripReceiverSerializeSpa = ratioPinchQuit;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",BinFaxEight.icyAboutDrum.noiseYearDash, ratioPinchQuit.redoneArmCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *dutchEndImage = [UIImage unifyOccurredTryAwakeNaturalName:BinFaxEight.icyAboutDrum.desktopSupportedClampPhaseDiastolicDirector];
    
    
    CGSize winAllPlainSize = CGSizeMake(13, 13); 
    
    
    UIImage *expandImage = [self filmFarYardHowImage:dutchEndImage trialDidSize:winAllPlainSize];
    
    
    UIImage *templateImage = [expandImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
    [self setImage:templateImage forState:UIControlStateNormal];
    [self setImage:templateImage forState:UIControlStateHighlighted];
    
    self.tintColor = UIColor.darkGrayColor;
    
    
    self.imageView.contentMode = UIViewContentModeScaleAspectFit;
    
    
    self.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft; 
    CGFloat spacing = 3.0; 
    self.imageEdgeInsets = UIEdgeInsetsMake(0, spacing, 0, -spacing);  
    self.titleEdgeInsets = UIEdgeInsetsMake(0, -spacing, 0, spacing);   
    
    
    [self setBackgroundColor:UIColor.clearColor];
    [self setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [self setTitleColor:UIColor.lightGrayColor forState:UIControlStateHighlighted];
    self.titleLabel.font = [UIFont systemFontOfSize:16];

    
    self.contentEdgeInsets = UIEdgeInsetsMake(8, 12, 8, 12); 
    
    
    [self sizeToFit];
    
    
    [self addTarget:self action:@selector(otherAgeMixClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)filmFarYardHowImage:(UIImage *)image trialDidSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat microAlone = targetSize.width / image.size.width;
    CGFloat hoverLawCat = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(microAlone, hoverLawCat);
    
    
    CGRect tremorRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - tremorRect.size.width) / 2.0,
                               (targetSize.height - tremorRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                tremorRect.size.width,
                                tremorRect.size.height)];
    
    UIImage *sayImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return sayImage;
}


- (void)otherAgeMixClicked {
    SignWeightAccessedTrashMeanDogViewController *ask = [SignWeightAccessedTrashMeanDogViewController new];
    ask.parseCityDelegate = self;
    [self.hashUpperRowViewController.navigationController pushViewController:ask animated:NO];
}

- (void)lineFullHoursExistingAchievedShutterHexIdiom:(AirHighJob *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",BinFaxEight.icyAboutDrum.noiseYearDash, country.redoneArmCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.warpStripReceiverSerializeSpa = country;
}

- (void)dealloc {
    
}
@end
