I have a uitableview whose cells i have changed to black background. when i scroll however the vi开发者_如何学编程ew below is white. I think this is the mainwindow.xib..How can I change the background colour to black? I have tried setting the window background colour in IB but it doesnt work..
It cannot be MainWindow. You need to change the background color in the nib file which loads your table view. Open up MainWindow.xib in interface builder and find out what particular nib file gets loaded by MainWindow when you start your application.
Alternate way of doing this is go to your xxxAppDelegate.m file and look for the below line
[window addSubview:myController.view];
Find out what the nib file for myController and change the background color of it using interface builder or go to myController.m file and in viewDidLoad method, change the background color of view like below
self.view.backgroundColor = [UIColor clearColor];
You can change the background color in mainWindow.xib. But this will not solve your problem, as you must be adding some view on main window.
Open the nib file in which the table view is present. And set its root view's background color to black.
精彩评论