未验证 提交 9e1af6d7 编写于 作者: Y yixiangboy 提交者: GitHub

Merge pull request #298 from goodleixiao/master

统一布局颜色定义,方便检查黑色界面
......@@ -9,6 +9,8 @@
#import "DoraemonDefine.h"
#import "DoraemonVisualInfoWindow.h"
#define ALIGN_COLOR @"#FF0000"
static CGFloat const kViewCheckSize = 62;
@interface DoraemonViewAlignView()
......@@ -24,6 +26,8 @@ static CGFloat const kViewCheckSize = 62;
@end
@implementation DoraemonViewAlignView
-(instancetype)init{
......@@ -45,18 +49,18 @@ static CGFloat const kViewCheckSize = 62;
[imageView addGestureRecognizer:pan];
_horizontalLine = [[UIView alloc] initWithFrame:CGRectMake(0, imageView.doraemon_centerY-0.25, self.doraemon_width, 0.5)];
_horizontalLine.backgroundColor = [UIColor doraemon_colorWithHexString:@"#666666"];
_horizontalLine.backgroundColor = [UIColor doraemon_colorWithHexString:ALIGN_COLOR];
[self addSubview:_horizontalLine];
_verticalLine = [[UIView alloc] initWithFrame:CGRectMake(imageView.doraemon_centerX-0.25, 0, 0.5, self.doraemon_height)];
_verticalLine.backgroundColor = [UIColor doraemon_colorWithHexString:@"#666666"];
_verticalLine.backgroundColor = [UIColor doraemon_colorWithHexString:ALIGN_COLOR];
[self addSubview:_verticalLine];
[self bringSubviewToFront:_imageView];
_leftLabel = [[UILabel alloc] init];
_leftLabel.font = [UIFont systemFontOfSize:12];
_leftLabel.textColor = [UIColor doraemon_colorWithHexString:@"#666666"];
_leftLabel.textColor = [UIColor doraemon_colorWithHexString:ALIGN_COLOR];
_leftLabel.text = [NSString stringWithFormat:@"%.1f",imageView.doraemon_centerX];
[self addSubview:_leftLabel];
[_leftLabel sizeToFit];
......@@ -64,7 +68,7 @@ static CGFloat const kViewCheckSize = 62;
_topLabel = [[UILabel alloc] init];
_topLabel.font = [UIFont systemFontOfSize:12];
_topLabel.textColor = [UIColor doraemon_colorWithHexString:@"#666666"];
_topLabel.textColor = [UIColor doraemon_colorWithHexString:ALIGN_COLOR];
_topLabel.text = [NSString stringWithFormat:@"%.1f",imageView.doraemon_centerY];
[self addSubview:_topLabel];
[_topLabel sizeToFit];
......@@ -72,7 +76,7 @@ static CGFloat const kViewCheckSize = 62;
_rightLabel = [[UILabel alloc] init];
_rightLabel.font = [UIFont systemFontOfSize:12];
_rightLabel.textColor = [UIColor doraemon_colorWithHexString:@"#666666"];
_rightLabel.textColor = [UIColor doraemon_colorWithHexString:ALIGN_COLOR];
_rightLabel.text = [NSString stringWithFormat:@"%.1f",self.doraemon_width-imageView.doraemon_centerX];
[self addSubview:_rightLabel];
[_rightLabel sizeToFit];
......@@ -80,7 +84,7 @@ static CGFloat const kViewCheckSize = 62;
_bottomLabel = [[UILabel alloc] init];
_bottomLabel.font = [UIFont systemFontOfSize:12];
_bottomLabel.textColor = [UIColor doraemon_colorWithHexString:@"#666666"];
_bottomLabel.textColor = [UIColor doraemon_colorWithHexString:ALIGN_COLOR];
_bottomLabel.text = [NSString stringWithFormat:@"%.1f",self.doraemon_height - imageView.doraemon_centerY];
[self addSubview:_bottomLabel];
[_bottomLabel sizeToFit];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册