HGPlaceholders alternatives and similar libraries
Based on the "Table View / Collection View" category.
Alternatively, view HGPlaceholders alternatives based on common mentions on social networks and blogs.
-
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
MCSwipeTableViewCell
DISCONTINUED. 👆 Convenient UITableViewCell subclass that implements a swippable content to trigger actions (similar to the Mailbox app). -
ReverseExtension
A UITableView extension that enables cell insertion from the bottom of a table view. -
CenteredCollectionView
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift -
Bohr
DISCONTINUED. Bohr allows you to set up a settings screen for your app with three principles in mind: ease, customization and extensibility. -
CascadingTableDelegate
A no-nonsense way to write cleaner UITableViewDelegate and UITableViewDataSource in Swift. -
GLTableCollectionView
Netflix and App Store like UITableView with UICollectionView, written in pure Swift 4.2 -
ListPlaceholder
ListPlaceholder is a swift library allows you to easily add facebook style animated loading placeholder to your tableviews or collection views. -
KDDragAndDropCollectionView
This component allows for the transfer of data items between collection views through drag and drop -
DataSources
💾 🔜📱 Type-safe data-driven CollectionView, TableView Framework. (We can also use ASCollectionNode) -
DTTableViewManager
Protocol-oriented UITableView management, powered by generics and associated types. -
TLIndexPathTools
TLIndexPathTools is a small set of classes that can greatly simplify your table and collection views. -
CollapsibleTableSectionViewController
:tada: Swift library to support collapsible sections in a table view. -
RHPreviewCell
I envied so much Spotify iOS app this great playlist preview cell 😍, I decided to create my own one 🌶. Now you can give your users ability to quick check "what content is hidden under your UITableViewCell". Great think is that this Library not requires 3D Touch support from user device💥. -
SquareMosaicLayout
An extandable mosaic UICollectionViewLayout with a focus on extremely flexible customizations :large_orange_diamond: -
HoverConversion
DISCONTINUED. HoverConversion realized vertical paging with UITableView. UIViewController will be paging when reaching top or bottom of UITableView contentOffset. -
GenericDataSource
A generic small reusable components for data source implementation for UITableView/UICollectionView in Swift. -
PJFDataSource
PJFDataSource is a small library that provides a simple, clean architecture for your app to manage its data sources while providing a consistent user interface for common content states (i.e. loading, loaded, empty, and error). -
AZCollectionViewController
Easy way to integrate pagination with dummy views in CollectionView, make Instagram "Discover" within minutes. -
ios-dragable-table-cells
DISCONTINUED. Objective-C library for drag-n-drop of UITableViewCells in a navigation hierarchy of view controllers.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of HGPlaceholders or a related project?
README
HGPlaceholders
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
- iOS 8.0+
- Xcode 9.2
You also may like
- HGCircularSlider - A custom reusable circular slider control for iOS application.
- HGRippleRadarView - A beautiful radar view to show nearby users with ripple animation, fully customizable
Installation
HGPlaceholders is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'HGPlaceholders'
HGPlaceholders is also available through Carthage. To install it, simply add the following line to your Cartfile:
github "HamzaGhazouani/HGPlaceholders"
Usage
- Inherit your UITableView class from TableView Or inherit UICollectionView from CollectionView
- Call the placeholder to show
tableView.showLoadingPlaceholder()
orcollectionView.showLoadingPlaceholder()
tableView.showNoResultsPlaceholder()
orcollectionView.showNoResultsPlaceholder()
tableView.showErrorPlaceholder()
orcollectionView.showErrorPlaceholder()
tableView.showNoConnectionPlaceholder()
orcollectionView.showNoConnectionPlaceholder()
Customization
If you want to change only images, just set them in your asset with this names (the framework check firstly in the main bundle):
- loading : "hg_default-loading"
- no_connection : "hg_default-no_connection"
- no_results : "hg_default-no_results"
- error : "hg_default-error"
The framework contains different defaults placeholders:
- Basic :
tableView.placeholdersProvider = .basic
or collectionView.placeholdersProvider = .basic
- Default :
tableView.placeholdersProvider = .default
or collectionView.placeholdersProvider = .default
- Default2 :
tableView.placeholdersProvider = .default2
or collectionView.placeholdersProvider = .default2
- Hallowen :
tableView.placeholdersProvider = .halloween
or collectionView.placeholdersProvider = .halloween
// for fun :)`
If you want to change the default palceholders for all table views in your project:
class ProjectNameTableView: TableView {
override func customSetup() {
placeholdersProvider = .basic
}
}
class ProjectNameCollectionView: CollectionView {
override func customSetup() {
placeholdersProvider = .basic
}
}
You can also add new placeholders fully customizable, you should keep in mind that the view will take table view frame, and placeholder can have only one action, please check the example project
Creating a new theme from scratch
static var summer: PlaceholdersProvider {
var commonStyle = PlaceholderStyle()
commonStyle.backgroundColor = UIColor(red: 1.0, green: 236.0/255, blue: 209.0/255.0, alpha: 1.0)
commonStyle.actionBackgroundColor = .black
commonStyle.actionTitleColor = .white
commonStyle.titleColor = .black
commonStyle.isAnimated = false
commonStyle.titleFont = UIFont(name: "AvenirNextCondensed-HeavyItalic", size: 19)!
commonStyle.subtitleFont = UIFont(name: "AvenirNextCondensed-Italic", size: 19)!
commonStyle.actionTitleFont = UIFont(name: "AvenirNextCondensed-Heavy", size: 19)!
var loadingStyle = commonStyle
loadingStyle.actionBackgroundColor = .clear
loadingStyle.actionTitleColor = .gray
var loadingData: PlaceholderData = .loading
loadingData.image = #imageLiteral(resourceName: "summer-hat")
let loading = Placeholder(data: loadingData, style: loadingStyle, key: .loadingKey)
var errorData: PlaceholderData = .error
errorData.image = #imageLiteral(resourceName: "summer-ball")
let error = Placeholder(data: errorData, style: commonStyle, key: .errorKey)
var noResultsData: PlaceholderData = .noResults
noResultsData.image = #imageLiteral(resourceName: "summer-cocktail")
let noResults = Placeholder(data: noResultsData, style: commonStyle, key: .noResultsKey)
var noConnectionData: PlaceholderData = .noConnection
noConnectionData.image = #imageLiteral(resourceName: "summer-beach-slippers")
let noConnection = Placeholder(data: noConnectionData, style: commonStyle, key: .noConnectionKey)
let placeholdersProvider = PlaceholdersProvider(loading: loading, error: error, noResults: noResults, noConnection: noConnection)
let xibPlaceholder = Placeholder(cellIdentifier: "CustomPlaceholderCell", key: PlaceholderKey.custom(key: "XIB"))
placeholdersProvider.add(placeholders: xibPlaceholder)
return placeholdersProvider
}
### Adding a custom placeholder to an existing theme
private static var starWarsPlaceholder: Placeholder {
var starwarsStyle = PlaceholderStyle()
starwarsStyle.backgroundColor = .black
starwarsStyle.actionBackgroundColor = .clear
starwarsStyle.actionTitleColor = .white
starwarsStyle.titleColor = .white
starwarsStyle.isAnimated = false
var starwarsData = PlaceholderData()
starwarsData.title = NSLocalizedString("\"This is a new day, a\nnew beginning\"", comment: "")
starwarsData.subtitle = NSLocalizedString("Star Wars", comment: "")
starwarsData.image = #imageLiteral(resourceName: "star_wars")
starwarsData.action = NSLocalizedString("OK!", comment: "")
let placeholder = Placeholder(data: starwarsData, style: starwarsStyle, key: PlaceholderKey.custom(key: "starWars"))
return placeholder
}
let provider = PlaceholdersProvider.summer
provider.addPlaceholders(MyUtilityClass.starWarsPlaceholder)
Documentation
Full documentation is available on CocoaDocs. You can also install documentation locally using jazzy.
Author
Hamza Ghazouani, [email protected]
License
HGPlaceholders is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the HGPlaceholders README section above
are relevant to that project's source code only.