Skip to content

Instantly share code, notes, and snippets.

@Yorzic
Created May 29, 2020 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yorzic/d6a9f16d72d0163ab5ab8f79ebdd39f6 to your computer and use it in GitHub Desktop.
Save Yorzic/d6a9f16d72d0163ab5ab8f79ebdd39f6 to your computer and use it in GitHub Desktop.
Call handleCSVFile method from documentPicker didPickDocumentsAt method in iOS
public func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {
guard let myURL = urls.first else {
return
}
print("import result : \(myURL)")
if let data = handleCSVFile(url: myURL) {
cells = data
tableView.reloadData()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment