CXDitheredGradientView
一个非常基本的 UIView 子类。使用 CGGradient 绘制,支持抖动以避免色带伪影。
CXDitheredGradientView *gradientView = [[CXDitheredGradientView alloc] initWithFrame:self.view.bounds];
gradientView.colors = @[[UIColor redColor], [UIColor whiteColor], [UIColor blueColor]];
[self.view addSubview:gradientView];