Created
April 21, 2021 23:23
-
-
Save mhijack/18b496b62d813d41ff6c24ca112a4a09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension EmptyTableView { | |
func showEmptyCell() { | |
guard self.emptyDataSource !== self.dataSource else { | |
reloadData() | |
return | |
} | |
self.delegate = self.emptyTableViewDelegate | |
self.dataSource = self.emptyDataSource | |
self.reloadData() | |
} | |
func hideEmptyCell() { | |
guard self.normalDataSource !== self.dataSource else { | |
reloadData() | |
return | |
} | |
self.delegate = self.normalTableViewDelegate | |
self.dataSource = self.normalDataSource | |
self.reloadData() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment