Browse Source

Fix minor iOS 7 only table appearance issue

Felix Paul Kühne 11 years ago
parent
commit
2b99f4f2fc

+ 3 - 2
Sources/VLCLocalServerListViewController.m

@@ -224,7 +224,7 @@
 - (void)tableView:(UITableView *)tableView willDisplayCell:(VLCLocalNetworkListCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
 {
     UIColor *color = (indexPath.row % 2 == 0)? [UIColor blackColor]: [UIColor colorWithWhite:.122 alpha:1.];
-    cell.contentView.backgroundColor = cell.titleLabel.backgroundColor = cell.folderTitleLabel.backgroundColor = cell.subtitleLabel.backgroundColor =  color;
+    cell.contentView.backgroundColor = cell.titleLabel.backgroundColor = cell.folderTitleLabel.backgroundColor = cell.subtitleLabel.backgroundColor = color;
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
@@ -357,7 +357,8 @@
                           (id)[UIColor colorWithRed:(56.0f/255.0f) green:(56.0f/255.0f) blue:(56.0f/255.0f) alpha:1.0f].CGColor,
                           ];
             [headerView.layer insertSublayer:gradient atIndex:0];
-        }
+        } else
+            headerView.backgroundColor = [UIColor colorWithWhite:.122 alpha:1.];
 
 		UILabel *textLabel = [[UILabel alloc] initWithFrame:CGRectInset(headerView.bounds, 12.0f, 5.0f)];
 		textLabel.text = (NSString *) headerText;

+ 2 - 1
Sources/VLCMenuTableViewController.m

@@ -243,7 +243,8 @@
                           (id)[UIColor colorWithRed:(56.0f/255.0f) green:(56.0f/255.0f) blue:(56.0f/255.0f) alpha:1.0f].CGColor,
                           ];
             [headerView.layer insertSublayer:gradient atIndex:0];
-        }
+        } else
+            headerView.backgroundColor = [UIColor colorWithWhite:.122 alpha:1.];
 
 		UILabel *textLabel = [[UILabel alloc] initWithFrame:CGRectInset(headerView.bounds, 12.0f, 5.0f)];
 		textLabel.text = (NSString *) headerText;