//
|
// PBPhaseLabel.m
|
// IphoneBIMe
|
//
|
// Created by zjf on 2018/7/20.
|
// Copyright © 2018年 ProBIM. All rights reserved.
|
//
|
|
#import "PBPhaseLabel.h"
|
|
@implementation PBPhaseLabel
|
|
- (instancetype)initWithFrame:(CGRect)frame {
|
if (self = [super initWithFrame:frame]) {
|
self.textAlignment = NSTextAlignmentCenter;
|
self.font = [UIFont systemFontOfSize:16];
|
// self.backgroundColor = [UIColor colorWithRed:((float)arc4random_uniform(256) / 255.0) green:((float)arc4random_uniform(256) / 255.0) blue:((float)arc4random_uniform(256) / 255.0) alpha:1.0];
|
}
|
return self;
|
}
|
|
- (void)setScale:(CGFloat)scale {
|
_scale = scale;
|
self.textColor = [UIColor colorWithRed:scale green:0 blue:0 alpha:1];
|
CGFloat minScale = 1.0;
|
CGFloat maxScale = 1.3;
|
scale = minScale + (maxScale - minScale) *scale;
|
self.transform = CGAffineTransformMakeScale(scale, scale);
|
}
|
|
- (void)setIsSelectLabel:(BOOL)isSelectLabel {
|
_isSelectLabel = isSelectLabel;
|
if(isSelectLabel) {
|
self.textColor = WarningColor;
|
self.font = [UIFont systemFontOfSize:20];
|
}else {
|
self.textColor = DescColor;
|
self.font = [UIFont systemFontOfSize:16];
|
}
|
}
|
@end
|