Created
September 27, 2017 18:19
-
-
Save piotrbernad/45a0cf50d2f10989262de102ba677d84 to your computer and use it in GitHub Desktop.
EmptyDataSetSource Example
This file contains hidden or 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 PostsTableViewController: DZNEmptyDataSetSource { | |
func title(forEmptyDataSet scrollView: UIScrollView!) -> NSAttributedString! { | |
switch self.state { | |
case .loading: | |
return NSAttributedString(string: NSLocalizedString("Loading...", comment: "")) | |
case .refreshing: | |
return NSAttributedString(string: NSLocalizedString("Refreshing", comment: "")) | |
case .error: | |
return NSAttributedString(string: NSLocalizedString("Error", comment: "")) | |
default: | |
return NSAttributedString(string: "") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment