فهرست منبع

UPNP file list: fix alternating table background

Felix Paul Kühne 12 سال پیش
والد
کامیت
3f379915f1
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 6 1
      AspenProject/VLCLocalServerFolderListViewController.m

+ 6 - 1
AspenProject/VLCLocalServerFolderListViewController.m

@@ -107,7 +107,7 @@
 
     if (![item isContainer]) {
         MediaServer1ItemObject *mediaItem = _objectList[indexPath.row];
-        [cell setSubtitle:[NSString stringWithFormat:@"%@ - %@", mediaItem.size, mediaItem.duration]];
+        [cell setSubtitle:[NSString stringWithFormat:@"%@", mediaItem.size]];
         [cell setIsDirectory:NO];
     } else
         [cell setIsDirectory:YES];
@@ -119,6 +119,11 @@
 
 #pragma mark - Table view delegate
 
+- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    cell.backgroundColor = (indexPath.row % 2 == 0)? [UIColor blackColor]: [UIColor colorWithWhite:.122 alpha:1.];
+}
+
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
     MediaServer1BasicObject *item = _objectList[indexPath.row];