我在我的iOS应用程序中使用了GPUImageView。我希望GPUImageView具有透明背景。
我尝试使用setBackground:[UIColor clearColor],但它没有起作用。
有什么解决方法吗?
谢谢!
我发现你需要同时设置这两个参数才能获得透明背景。单独设置其中一个是不起作用的。
strengthPreviewImageView.backgroundColor = [UIColor clearColor];
[strengthPreviewImageView setBackgroundColorRed:0 green:0 blue:0 alpha:0];
- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent;