//
//  ZanButton.m
//  redstar
//
//  Created by admin on 15/11/2.
//  Copyright © 2015年 ZWF. All rights reserved.
//

#import "ZanButton.h"

@implementation ZanButton


// 修改按钮内部子控件的frame
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    // 1.imageView
    CGFloat imageX = 2;
    CGFloat imageY = 1;
    CGFloat imageW = 16.5;
    CGFloat imageH = 18;
    self.imageView.frame = CGRectMake(imageX, imageY, imageW, imageH);
    
    
    // 2.title
    CGFloat titleX = imageW + imageX + 2;
    CGFloat titleY = 0;
    CGFloat titleW = self.bounds.size.width - titleX;
    CGFloat titleH = self.bounds.size.height - titleY;
    self.titleLabel.frame = CGRectMake(titleX , titleY, titleW, titleH);
    
}


@end
