最佳答案
我有一个 CAGradientLayer 插入到这个小细节视图的底部,弹出在应用程序的底部。如你所见,我把颜色从白色调到了透明但是有一种奇怪的灰色出现了。有什么想法吗?
// Set up detail view frame and gradient
[self.detailView setFrame:CGRectMake(0, 568, 320, 55)];
CAGradientLayer *layer = [CAGradientLayer layer];
layer.frame = self.detailView.bounds;
layer.colors = [NSArray arrayWithObjects:(id)[UIColor whiteColor].CGColor, (id)[UIColor clearColor].CGColor, nil];
layer.startPoint = CGPointMake(1.0f, 0.7f);
layer.endPoint = CGPointMake(1.0f, 0.0f);
[self.detailView.layer insertSublayer:layer atIndex:0];
以下是一个有问题的观点: