添加分割线的方法

1.采用透明度

//添加分割线
- (void)addLineWith:(UIView *)line
{
    line.backgroundColor = [UIColor blueColor];
    line.alpha = 1.0;
    [self.bottomView addSubview:line];
}

 2.设置线条的宽度

//下划线
UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, 89.5, screen_width, 0.5)];
lineView.backgroundColor = separaterColor;
[cell addSubview:lineView];

 

posted on 2015-07-31 17:12  pTrack  阅读(345)  评论(0)    收藏  举报