Post

Replies

Boosts

Views

Activity

swift compiler error
heres the error! Cannot assign value of type 'DayData' to type '[DayData]' here's my code in ViewController: private func fetchData() {         APICaller.shared.getCovidData(for: scope) { [weak self] result in             switch result {             case .success(let dayData):                 self?.dayData = dayData             case .failure(let error):                 print(error)             }         }     }
1
0
470
Nov ’21
swift compiler error
heres the error! Cannot assign value of type 'DayData' to type '[DayData]' here's my code in ViewController: private func fetchData() {         APICaller.shared.getCovidData(for: scope) { [weak self] result in             switch result {             case .success(let dayData):                 self?.dayData = dayData             case .failure(let error):                 print(error)             }         }     }
Replies
1
Boosts
0
Views
470
Activity
Nov ’21