//
//  IBTUIButton.m
//  XFFruit
//
//  Created by Xummer on 3/30/15.
//  Copyright (c) 2015 Xummer. All rights reserved.
//

#import "IBTUIButton.h"

@implementation IBTUIButton

+ (id)RoundCornerBtnWithTitle:(NSString *)title bgColor:(UIColor *)bgColor {
    IBTUIButton *btn = [IBTUIButton buttonWithType:UIButtonTypeCustom];
    [btn setTitle:title forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [btn setBackgroundImage:[UIImage imageWithColor:bgColor ? : ICR_BLUE_BTN_COLOR]
                   forState:UIControlStateNormal];
    [btn setBackgroundImage:[UIImage imageWithColor:ICR_DISABLE_BTN_COLOR]
                   forState:UIControlStateDisabled];
    btn.layer.cornerRadius = 4;
    btn.layer.masksToBounds = YES;
    return btn;
}

@end
