添加背景颜色会隐藏我的线条

时间:2016-01-15 04:03:25

标签: ios colors

我使用UIBezier Path创建了一行:

    UIBezierPath *path2 = [UIBezierPath bezierPath];
    [path2 moveToPoint:CGPointMake(110, 290)];
    [path2 addLineToPoint:CGPointMake(310, 290)];
    path2.lineWidth = 1;
    [[UIColor blackColor] setStroke];
    [path2 stroke];

但是当我添加这个:

 UIColor *color4 = [UIColor colorWithRed:0.98 green:0.91 blue:0.71 alpha:1];
 self.view.backgroundColor = color4;

我再也看不到这条线了。你知道为什么会这样吗?

0 个答案:

没有答案
相关问题