1

I know this question has been asked before and i've been searching for hours now but I just can't find the answer. I want to change the color of the table that shows when u drag down the table on the absolute top as here:

Picture

The part between the searchbox and the segmented control. I'm not sure which element it is where I have to change the color. I tried everything I could find over the interface builder (table, searchbar, cell) and it seems like nothing can help. I read this post about changing the UITableView's background color but that also didn't do the job for me: Post about background colors

I know that when I usually change the color of the underlying view of the table that this background color changes, but not in this table so i thought something is might overlapping.

UPDATE I figured that this only happens when I add a search bar with search display controller, but I still dont know where to change the background color there.

So maybe someone could tell me which element it is that I'm trying to change.

Thanks in advance :)

Community
  • 1
  • 1
DominikArr
  • 43
  • 6
  • Does this answer your question? [UITableView clear background](https://stackoverflow.com/questions/18753411/uitableview-clear-background) – Top-Master Apr 05 '21 at 04:33

1 Answers1

0
  • Set the background color of the UITableView in ViewDidLoad Method not in XIB.
  • (void)viewDidLoad {

    [super viewDidLoad];

    self.myTableView.backgroundColor = [UIColor blueColor];

}

  • And CellForROwAtIndexPathMethod,mention the Background color of cell and ContentView of Cell to Clear Color.

    -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { .....

    cell.backgroundColor =[UIColor clearColor];
    cell.contentView.backgroundColor = [UIColor clearColor];
    ....
    

    }

ScreenShot

Jayaprada
  • 944
  • 8
  • 11
  • Hey thanks for replying but I tried all of this and I doesnt seem to work. I dont think this is the source of my problem if you have a look at the update of my initial post – DominikArr May 05 '14 at 10:28