2012-12-11 26 views
7

Tôi đang sử dụng GPUImageView bên trong ứng dụng iOS của mình. Tôi muốn GPUImageView có nền trong suốt. Tôi đã thử setBackground: [UIColor clearColor] Nó không hoạt động. Bất kỳ cách giải quyết nào?GPUImageView trong suốt?

Kính trọng

Trả lời

3

... Bạn đã thử phương pháp từ tiêu đề GPUImageView chưa?

- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent; 
+0

setBackgroundColorRed: 1.0 green: 1.0 blue: 1.0 alpha: 0.0 cho nền trắng – user559668

10

Tôi thấy bạn cần đặt cả hai thứ này để có nền trong suốt. Không làm việc một mình.

strengthPreviewImageView.backgroundColor = [UIColor clearColor]; 
[strengthPreviewImageView setBackgroundColorRed:0 green:0 blue:0 alpha:0];