This problem is only in ios7. I have 2 photos included that show my problem. It looks as it should in IOS 6 but I have white backgrounds in IOS 7.
I attempted to add some code that checked the system version and add a UIColor clearColor if the version was 7.0 but the cells are still white.
Nothing seems to be depreciated that I can see that would cause this problem.
Just in case the issue with the creation of the tableView it's self that is causing the problem the code is below.
Thanks.
I attempted to add some code that checked the system version and add a UIColor clearColor if the version was 7.0 but the cells are still white.
Code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
cell.textLabel.font = [UIFont fontWithName:@"Papyrus" size:26];
cell.textLabel.textColor = [UIColor blackColor];
if (tableView == characterListTableView) {
if (indexPath.row == 0) {
cell.textLabel.textAlignment = UITextAlignmentCenter;
}
cell.textLabel.text = [characterArray objectAtIndex:indexPath.row];
[COLOR="Red"]if (deviceVersion == 7.0) {
cell.textLabel.backgroundColor = [UIColor clearColor];
}[/COLOR]
}
else if (tableView == foundTV){
cell.textLabel.textAlignment = UITextAlignmentCenter;
cell.textLabel.text = [foundFiles objectAtIndex:indexPath.row];
}
return cell;
}
Nothing seems to be depreciated that I can see that would cause this problem.
Just in case the issue with the creation of the tableView it's self that is causing the problem the code is below.
Code:
characterListTableView = [[UITableView alloc] initWithFrame:CGRectMake(675, 165, 272, 388) style:UITableViewStylePlain];
characterListTableView.dataSource = self;
characterListTableView.delegate = self;
characterListTableView.backgroundColor = [UIColor clearColor];
characterListTableView.separatorColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.7];
characterListTableView.opaque = NO;
characterListTableView.backgroundView = nil;
[characterListTableView.layer setBorderColor: [[UIColor blackColor] CGColor]];//set black boarder around notefield
[characterListTableView.layer setBorderWidth: 2.0];//set black boarder thikness
CALayer * btv = [characterListTableView layer]; // rounds the edges of the noteField
[btv setMasksToBounds:YES];
[btv setCornerRadius:10.0];
[self.view addSubview:characterListTableView];
UIImage *imagePaper = [UIImage imageNamed:@"scroll_paper.png"];
[tableViewWhiteWash setImage:imagePaper];
tableViewWhiteWash.alpha = 0.5;
//[tableViewWhiteWash setBackgroundColor:[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.5]];
CALayer * bvbg = [tableViewWhiteWash layer]; // rounds the edges of the noteField
[bvbg setMasksToBounds:YES];
[bvbg setCornerRadius:10.0];
[tableViewImportWhiteWash setImage:imagePaper];
tableViewImportWhiteWash.alpha = 0.0;
CALayer * bvim = [tableViewImportWhiteWash layer]; // rounds the edges of the noteField
[bvim setMasksToBounds:YES];
[bvim setCornerRadius:10.0];
Thanks.