7

I am using a GPUImageView inside my iOS application. I want that the GPUImageView have a transparent background. I tried setBackground:[UIColor clearColor] It does not work. Any workarounds?

Regards

leppie
  • 115,091
  • 17
  • 196
  • 297
user559668
  • 159
  • 9

2 Answers2

10

I found you need to set both of these to get a transparent background. Neither works alone.

strengthPreviewImageView.backgroundColor = [UIColor clearColor];
[strengthPreviewImageView setBackgroundColorRed:0 green:0 blue:0 alpha:0];
kev
  • 7,712
  • 11
  • 30
  • 41
3

...Did you try the method from the GPUImageView header?

- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent;
borrrden
  • 33,256
  • 8
  • 74
  • 109