标签末尾有一条线。不知道为什么会这样。一段时间在风景和一些时间在肖像。这是一贯的问题。可能是什么问题?在附加的图像中,如果我改变它消失的方向,则会显示一个边框。
以下是我的实施
@implementation MCLabel
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
btnSeeMore = [MCButton buttonWithType:UIButtonTypeCustom];
[btnSeeMore setBackgroundColor:[UIColor clearColor]];
[btnSeeMore setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
[self addSubview:btnSeeMore];
[btnSeeMore setHidden:YES];
}
return self;
}
这是我添加标签的方式
MCLabel *lblRecord = [[MCLabel alloc] init];
[vwRow addSubview:lblRecord];
[lblRecord setLineBreakMode:NSLineBreakByTruncatingTail];
[lblRecord setTextAlignment:column.alignmentOfObject];
[lblRecord setFont:column.fontOfObject];
[lblRecord setStrObjID:column.linkName];
[lblRecord setBackgroundColor:column.clrBackground];
[lblRecord setFrame:column.frame];
[lblRecord setText:column.strData];