Your view is working as intended. You are setting it to use a clear background color, which means exactly as it is named, clear, and you will see color and possibly other UI elements underneath your view. Think of it as placing clear plastic wrap (the view) on top of colored construction paper (the super view). If you wish to find where the black color is coming from, I would start with your root controller's view.
Set background color for UIView [closed]
-
15-03-2022 - |
문제
I have a problem when setting the background color for a UIView. What I am doing is:
- (void) viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor clearColor];
}
but I am getting a black background color as shown below:
If I change the background to any another color it works. Any ideas about this ?
해결책
제휴하지 않습니다 StackOverflow