//
//  MarkCollectionViewCell.m
//  ArcGis
//
//  Created by Mac Book DQ02 on 16/3/17.
//  Copyright © 2016年 Xu Mengzhu. All rights reserved.
//

#import "MarkCollectionViewCell.h"

@implementation MarkCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    float width = self.frame.size.width;
    float height = self.frame.size.height;
    if (self) {
        self.backgroundColor = [UIColor blackColor];
        self.markbtn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, width, height*2/3)];
        self.markLabel =[[UILabel alloc]initWithFrame:CGRectMake(0, height*2/3, width, height*2/7)];
        self.markLabel.backgroundColor = [UIColor blackColor];
        self.markLabel.textColor = [UIColor whiteColor];
        self.markLabel.textAlignment = NSTextAlignmentCenter;
        if (IS_IPHONE6_UP) {
            self.markLabel.font = [UIFont systemFontOfSize:12];
        }
        else
        {
            self.markLabel.font = [UIFont systemFontOfSize:11];
        }
        
      
        [self addSubview:self.markbtn];
        [self addSubview:self.markLabel];
    }
    return self;
}

-(void)setBtnNormalImage:(NSString *)normalImgName andLabelText:(NSString *)labText
{
    [self.markbtn setBackgroundImage:[UIImage imageNamed:normalImgName] forState:UIControlStateNormal];
    self.markLabel.text = labText;
}
-(void)setBtnSelectImage:(NSString *)selectImgName
{
    [self.markbtn setBackgroundImage:[UIImage imageNamed:selectImgName] forState:UIControlStateSelected];
}
@end
