Shows source errors in SourcesViewController

This commit is contained in:
Riley Testut
2020-08-27 16:39:03 -07:00
parent b7564207b3
commit 4c3d33efdc
13 changed files with 158 additions and 17 deletions

View File

@@ -99,6 +99,11 @@ class NewsViewController: UICollectionViewController
self.collectionView.contentInset.bottom = 20
}
}
@IBAction private func unwindFromSourcesViewController(_ segue: UIStoryboardSegue)
{
self.fetchSource()
}
}
private extension NewsViewController
@@ -198,6 +203,7 @@ private extension NewsViewController
if self.dataSource.itemCount > 0
{
let toastView = ToastView(error: error)
toastView.addTarget(nil, action: #selector(TabBarController.presentSources), for: .touchUpInside)
toastView.show(in: self)
}