我使用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;
我再也看不到这条线了。你知道为什么会这样吗?