// // VerButton.m // MingMen // // Created by 罗云飞 on 2017/3/9. // Copyright © 2017年 罗云飞. All rights reserved. // #import "VerButton.h" @implementation VerButton - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.backgroundColor = [UIColor whiteColor]; self.titleLabel.textAlignment = NSTextAlignmentCenter; _lineView = [[UIView alloc] init]; _lineView.backgroundColor = [UIColor colorWithRed:0.81f green:0.81f blue:0.81f alpha:1.00f]; [self addSubview:_lineView]; } return self; } - (void)layoutSubviews { [super layoutSubviews]; _lineView.frame = CGRectMake(0, self.bounds.size.height-0.5, self.bounds.size.width, 0.5); } @end