A Swift library for displaying customizable loading, error, and empty state placeholders in UITableView and UICollectionView.
HGPlaceholders is a Swift library for iOS that provides customizable placeholders for UITableView and UICollectionView. It solves the problem of displaying loading, error, and empty states in a consistent and visually appealing way, enhancing the user experience during data loading scenarios.
iOS developers building apps with UITableView or UICollectionView who want to implement professional loading and empty state screens without custom boilerplate code.
Developers choose HGPlaceholders because it offers a simple API, multiple built-in themes, and extensive customization options, making it easy to create polished placeholder experiences that match any app design.
Nice library to show placeholders and Empty States for any UITableView/UICollectionView in your project
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Simply inherit from TableView or CollectionView and call methods like showLoadingPlaceholder(), as demonstrated in the README's usage section, reducing boilerplate code.
Offers multiple pre-designed themes such as Basic, Default, Default2, and Halloween, allowing quick implementation without custom design work.
Enables full control over styles, images, and actions, including creating new themes from scratch or adding custom placeholders, with detailed code examples provided.
Allows easy image swaps by naming assets according to a convention (e.g., 'hg_default-loading'), as noted in the README, facilitating branding updates.
The README explicitly states that placeholders can have only one action, restricting complex interactions like multiple buttons for error handling or empty states.
Requires inheriting from specific classes (TableView or CollectionView), which can conflict with existing inheritance hierarchies or composition-based designs.
Limited to UITableView and UICollectionView, with no support for SwiftUI or other view types, making it unsuitable for cross-platform or modern iOS projects.