Reputation: 1648
I want to set a background color to a view and as of now I have subclassed that view in Xib and in drawRect
method I am setting the color.
- (void)drawRect:(NSRect)dirtyRect {
[[NSColor blackColor] setFill];
NSRectFill(dirtyRect);
[super drawRect:dirtyRect];
}
Am using [self.view enterFullScreenMode:screen withOptions:nil];
to show the view(which contains an image) in fullscreen. But when view is in fullscreen it shows a default gray background instead of black color. How can I set the background to black ?
Upvotes: 0
Views: 285
Reputation: 9392
Are you sure your methods calling? Put a NSLog to make sure.
If it is, then delete the line [super drawRect:dirtyRect];
Upvotes: 1