This is simple, customized and easy state wise PlaceHolder for TableView and CollectionView.
SSPlaceHolderTableView doesn't contain any external dependencies.
It is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SSPlaceHolderTableView'
NetworkUnReachableBlock
Put this code in viewDidLoad
tblView.networkUnReachableBlock = {
// put your API Call here.
}
Loading State
Customisation: In loadingImg param, You can pass your custom image and in loadingLabelTitle you can pass your custom attributed string.
tblView.setState(.loading(loadingImg: nil, loadingLabelTitle: nil))
Data Available State
When your data successfully available simply put this line in your code.
tblView.setState(.dataAvailable(viewController: self))
Data UnAvailable State
Customisation: In noDataImg param, You can pass your custom image for no data and in noDataLabelTitle you can pass your custom attributed string.
tblView.setState(.noDataAvailable(noDataImg: nil, noDataLabelTitle: nil))
No Internet available State
Customisation: In noInternetImg param You can pass your custom image for no internet state and in noInternetLabelTitle you can pass your custom attributed string.
tblView.setState(.checkInternetAvaibility(noInternetImg: nil, noInternetLabelTitle: nil))
We would love you for the contribution to SSPlaceHolderTableView, check the LICENSE file for more info.
SSPlaceHolderTableView is Distributed under the MIT license. See LICENSE
for more information..