Thx for your answer.
I initialize the dataSource on the self (like often).
After that I set the tracks with a setter and I reload the datas :
`var tracks: [NSObject]? {
set {
datas = newValue
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) { [weak self] in
self!.tracksListTableView.reloadData() // to avoid the init bug...
}
}
get {
if let tracks: [NSObject] = datas as? [NSObject] {
return tracks
}
return nil
}
}
My bad but my project has 2 years old and I don't even remember how I plug the datas to the TableView... In the inspector ?
Thx.
Topic:
Programming Languages
SubTopic:
Swift
Tags: