소스 검색

FTP & UPnP list view: use exposed cell identifier

Felix Paul Kühne 10 년 전
부모
커밋
483688bedd
2개의 변경된 파일4개의 추가작업 그리고 10개의 파일을 삭제
  1. 2 6
      Sources/VLCFTPServerListViewController.m
  2. 2 4
      Sources/VLCUPnPServerListViewController.m

+ 2 - 6
Sources/VLCFTPServerListViewController.m

@@ -183,15 +183,11 @@
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    static NSString *CellIdentifier = @"LocalNetworkCellDetail";
-
-    VLCNetworkListCell *cell = (VLCNetworkListCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    VLCNetworkListCell *cell = (VLCNetworkListCell *)[tableView dequeueReusableCellWithIdentifier:VLCNetworkListCellIdentifier];
     if (cell == nil)
-        cell = [VLCNetworkListCell cellWithReuseIdentifier:CellIdentifier];
-
+        cell = [VLCNetworkListCell cellWithReuseIdentifier:VLCNetworkListCellIdentifier];
 
     NSDictionary *cellObject;
-
     if (tableView == self.searchDisplayController.searchResultsTableView)
         cellObject = _searchData[indexPath.row];
     else

+ 2 - 4
Sources/VLCUPnPServerListViewController.m

@@ -109,11 +109,9 @@
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    static NSString *CellIdentifier = @"LocalNetworkCellDetail";
-
-    VLCNetworkListCell *cell = (VLCNetworkListCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    VLCNetworkListCell *cell = (VLCNetworkListCell *)[tableView dequeueReusableCellWithIdentifier:VLCNetworkListCellIdentifier];
     if (cell == nil)
-        cell = [VLCNetworkListCell cellWithReuseIdentifier:CellIdentifier];
+        cell = [VLCNetworkListCell cellWithReuseIdentifier:VLCNetworkListCellIdentifier];
 
     MediaServer1BasicObject *item;
     if (tableView == self.searchDisplayController.searchResultsTableView) {