ソースを参照

VLCLocalServerListViewController : adding the service protocol name in the subtitle of the cell of the server discovery

Pierre SAGASPE 7 年 前
コミット
f1adc8ccc7

+ 5 - 2
Sources/LocalNetworkConnectivity/VLCServerListViewController.m

@@ -225,9 +225,10 @@
 
 - (void)tableView:(UITableView *)tableView willDisplayCell:(VLCNetworkListCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    UIColor *color = (indexPath.row % 2 == 0)? PresentationTheme.current.colors.cellBackgroundB : PresentationTheme.current.colors.cellBackgroundA;
+    UIColor *color = PresentationTheme.current.colors.cellBackgroundA;
     cell.backgroundColor = cell.titleLabel.backgroundColor = cell.folderTitleLabel.backgroundColor = cell.subtitleLabel.backgroundColor = color;
-    cell.titleLabel.textColor = cell.folderTitleLabel.textColor = cell.subtitleLabel.textColor = cell.thumbnailView.tintColor = PresentationTheme.current.colors.cellTextColor;
+    cell.titleLabel.textColor = cell.folderTitleLabel.textColor = cell.thumbnailView.tintColor = PresentationTheme.current.colors.cellTextColor;
+    cell.subtitleLabel.textColor = PresentationTheme.current.colors.cellDetailTextColor;
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
@@ -243,6 +244,8 @@
     [cell setIsDirectory:YES];
     [cell setIcon:service.icon];
     [cell setTitle:service.title];
+    [cell setTitleLabelCentered:NO];
+    [cell setSubtitle:service.serviceName];
 
     return cell;
 }