소스 검색

Improvements swift code

Marino Faggiana 8 년 전
부모
커밋
06d5f830f9
1개의 변경된 파일1개의 추가작업 그리고 8개의 파일을 삭제
  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 {