How to change the background of the view?
<p>I am doing a reader application in iphone,there is a button called lowlight view(night mode),when the user tap the button it atomatically chnages the background of the view,my reader view is tableview,i have two tableview in one view,two tableview shows diffrent contents,i know how to change the background of a tableview in a button click,i use this code for this.</p>

<pre><code> table1st.backgroundColor = [UIColor blackColor];
    table2nd.backgroundColor = [UIColor blackColor];
</code></pre>

<p>when the user tap the button it changes the background of the tableview,my problem is</p>

<ol>
<li><p>After the background change when the user tap,it shows the black background for both the tableviews,but when the user redirected to another view of the application and returns to reader view,it automatically change the background to default(my default is clear-color,that i set it in tableview cell property).i don't want this.</p></li>
<li><p>When the 1st tableview start scrolling it changes to default background,but in case of 2nd tableview there is no problem it didn't change the default state when the scrolling of that happens.</p></li>
<li><p>Last problem is how to change the text-label color of the tableview cell with the background change of the tableviews and also i have a label inside both the tableview cells,there is some text also in the label,i want to change the color of the label to white also like the text label color.</p></li>
</ol>

<p>How can i solve these problems?please help me.
thanks in advance.</p>

<p>edit:</p>

<pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {


   static NSString *CellIdentifier = @"Cell";

    readCell *cell = (readCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"readCell" owner:self options:nil]; 
        cell = [nib objectAtIndex:0]; 
        cell.malayalamVerse.hidden = YES;
        cell.malayalamVerse.backgroundColor = [UIColor clearColor];
        self.table.tableFooterView = _btnTablemoreview;
        self.table.tableFooterView.userInteractionEnabled = YES;

    }

    /*table.separatorColor = [UIColor clearColor];
    [cell setBackgroundColor:[UIColor colorWithRed:177 green:148 blue:106 alpha:1]];
    cell.chapterAndVerse.text = [NSString stringWithFormat:@"%@.%d ",delegate.selectedChapter,indexPath.row+1];
    cell.textLabel.font = [UIFont fontWithName:@"Georgia" size:16];
    UIFont *fnt = [UIFont fontWithName:@"Georgia" size:16];
    CGSize textSize;
    if([[delegate.allSelectedVerseMalayalam objectAtIndex:indexPath.row] sizeWithZFont:[[FontManager sharedManager] zFontWithName:@"testfont" pointSize:17] constrainedToSize:CGSizeMake(220,1000)  lineBreakMode:UILineBreakModeWordWrap].height &gt; [[delegate.allSelectedVerseEnglish objectAtIndex:indexPath.row] sizeWithFont:fnt    constrainedToSize:CGSizeMake(220,1000)  lineBreakMode:UILineBreakModeWordWrap].height)
    {
        textSize = [[delegate.allSelectedVerseMalayalam objectAtIndex:indexPath.row] sizeWithZFont:[[FontManager sharedManager] zFontWithName:@"testfont" pointSize:17] constrainedToSize:CGSizeMake(220,1000)  lineBreakMode:UILineBreakModeWordWrap];
    }
    else
    {
        textSize = [[delegate.allSelectedVerseEnglish objectAtIndex:indexPath.row] sizeWithFont:fnt constrainedToSize:CGSizeMake(220,1000)  lineBreakMode:UILineBreakModeWordWrap];
    }*/


    if(tableView == table)
    {
        UIView *myBackView = [[UIView alloc] initWithFrame:cell.frame];
       // myBackView.backgroundColor = [UIColor colorWithRed:250.0 green:248.0 blue:192.0 alpha:1.0];
        [myBackView setBackgroundColor:[UIColor clearColor]];
        cell.selectedBackgroundView = myBackView;
        [myBackView release];


        cell.textLabel.highlightedTextColor = [UIColor colorWithRed:1 green:1 blue:0.75 alpha:1];
        table.backgroundColor = [UIColor clearColor];
        table.separatorColor = [UIColor clearColor];
        cell.chapterAndVerse.text = [NSString stringWithFormat:@"%@.%d ",delegate.selectedChapter, indexPath.row+1];
        cell.chapterAndVerse.backgroundColor= [UIColor whiteColor];
        cell.chapterAndVerse.textColor = [UIColor brownColor];
        cell.chapterAndVerse.font = [UIFont fontWithName:@"Georgia" size:14.0];
        cell.chapterAndVerse.frame=CGRectMake(33, 6, 30.0, 12.0);
        cell.textLabel.text =  [NSString stringWithFormat:@"            %@",[delegate.allSelectedVerseEnglish objectAtIndex:indexPath.row]];
        cell.textLabel.font = [UIFont fontWithName:@"Georgia" size:15];
        cell.textLabel.textColor = [UIColor darkGrayColor];
        cell.textLabel.lineBreakMode = UILineBreakModeWordWrap;
        cell.textLabel.numberOfLines = 0;
        cell.backgroundColor = [UIColor clearColor];

        return cell;
    }


    else if(tableView == tab)
    {

        UIView *myBackView = [[UIView alloc] initWithFrame:cell.frame];
        // myBackView.backgroundColor = [UIColor colorWithRed:250.0 green:248.0 blue:192.0 alpha:1.0];
        [myBackView setBackgroundColor:[UIColor clearColor]];
        cell.selectedBackgroundView = myBackView;
        [myBackView release];


        cell.textLabel.highlightedTextColor = [UIColor colorWithRed:1 green:1 blue:0.75 alpha:1];
        cell.malayalamVerse.hidden = YES;
        cell.malayalamVerse.backgroundColor = [UIColor clearColor];
       // tab.backgroundColor = [UIColor clearColor];
        tab.separatorColor = [UIColor clearColor];
        cell.chapterAndVerse.frame = CGRectMake(0, 0,30.0,12.0);
        cell.chapterAndVerse.text = [NSString stringWithFormat:@"%@.%d ",delegate.selectedChapter, indexPath.row+1];
        cell.chapterAndVerse.backgroundColor= [UIColor whiteColor];
        cell.chapterAndVerse.textColor = [UIColor brownColor];
        cell.chapterAndVerse.font = [UIFont systemFontOfSize:7.0];
        cell.textLabel.text =  [NSString stringWithFormat:@"            %@",[delegate.allSelectedVerseHindi objectAtIndex:indexPath.row]];
        cell.textLabel.font = [UIFont fontWithName:@"Georgia" size:15];
        cell.textLabel.textColor = [UIColor darkGrayColor];
        cell.textLabel.lineBreakMode = UILineBreakModeWordWrap;
        cell.textLabel.numberOfLines = 0;
        cell.backgroundColor = [UIColor clearColor];


    }





   return cell; 

}
</code></pre>

<p>read cell is the tableview cell that i dvelop in xib,it holes the label which i want to change the fontcolor also. </p>
