소스 검색

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];