Sfoglia il codice sorgente

Improvements swift code

Marino Faggiana 8 anni fa
parent
commit
06d5f830f9
1 ha cambiato i file con 1 aggiunte e 8 eliminazioni
  1. 1 8
      Picker/DocumentPickerViewController.swift

+ 1 - 8
Picker/DocumentPickerViewController.swift

@@ -676,14 +676,7 @@ extension DocumentPickerViewController: UITableViewDataSource {
     
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
         
-        if (recordsTableMetadata == nil) {
-            
-            return 0
-            
-        } else {
-            
-            return recordsTableMetadata!.count
-        }
+       return recordsTableMetadata?.count ?? 0
     }
         
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {