Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. Reusable

Reusable

MITSwift4.1.2

A Swift mixin for type-safe reuse of UITableViewCells, UICollectionViewCells, UIViews, and UIViewController storyboards.

GitHubGitHub
3.0k stars233 forks0 contributors

What is Reusable?

Reusable is a Swift library that provides mixins for type-safe reuse of UI components in iOS apps, including UITableViewCells, UICollectionViewCells, custom UIViews, and UIViewController storyboards. It eliminates the need for string-based reuseIdentifiers, reducing boilerplate and potential runtime errors by leveraging Swift's type system.

Target Audience

iOS developers building apps with UIKit who want to simplify and secure the reuse of table view cells, collection view cells, and other UI components with compile-time safety.

Value Proposition

Developers choose Reusable for its elegant, protocol-based approach that removes string manipulation, provides clear error messages for misconfigurations, and integrates seamlessly with existing iOS conventions without requiring extensive code changes.

Overview

A Swift mixin for reusing views easily and in a type-safe way (UITableViewCells, UICollectionViewCells, custom UIViews, ViewControllers, Storyboards…)

Use Cases

Best For

  • Simplifying UITableViewCell and UICollectionViewCell registration and dequeuing
  • Loading custom UIViews from XIB files with type safety
  • Instantiating UIViewController from storyboards without string identifiers
  • Reducing boilerplate code in iOS view reuse patterns
  • Ensuring compile-time safety for reusable UI components
  • Adopting mixin-based design over inheritance in Swift projects

Not Ideal For

  • Projects using SwiftUI where view reuse is handled declaratively without identifiers
  • Teams heavily invested in string-based identifiers for legacy code or third-party library compatibility
  • Apps with highly dynamic cell types that change at runtime and don't benefit from compile-time type safety
  • Developers who prefer inheritance-based architectures over protocol mixins for UI design

Pros & Cons

Pros

Type-Safe Cell Reuse

Eliminates string-based reuseIdentifiers by using protocols like Reusable and NibReusable, ensuring compile-time safety and reducing errors, as shown in the dequeue examples without manual identifier manipulation.

Easy XIB Integration

Provides NibLoadable and NibOwnerLoadable protocols for loading custom UIViews from XIBs with simple calls like loadFromNib(), streamlining view instantiation.

Minimal Boilerplate

Conforming to protocols such as Reusable requires no additional code due to default mixin implementations, reducing repetitive registration and dequeuing logic.

Clear Error Messages

Uses descriptive fatalError messages for misconfigurations, like incorrect reuseIdentifiers, helping developers debug issues early, as mentioned in the README's error handling section.

Cons

UIKit and iOS Exclusive

Tied to UIKit and iOS development, making it unsuitable for projects using SwiftUI or targeting other Apple platforms without significant adjustments.

Requires Final Classes

Recommends marking subclasses as final for compiler optimizations, which can limit inheritance and flexibility in some architectural designs, as noted in the additional tips.

Convention-Driven Limitations

Relies heavily on naming conventions for reuseIdentifiers and nib files; deviations require custom implementations, adding complexity for non-standard use cases.

Swift Version Dependencies

Has specific version requirements for different Swift versions, as shown in the installation table, which could complicate upgrades or cross-version compatibility.

Frequently Asked Questions

Quick Stats

Stars2,979
Forks233
Contributors0
Open Issues15
Last commit2 years ago
CreatedSince 2016

Tags

#ios#collectionview#xib#ui-components#type-safe#swift#tableview#storyboard#uikit

Built With

S
Swift

Included in

iOS51.7k
Auto-fetched 6 hours ago

Related Projects

IGListKitIGListKit

A data-driven UICollectionView framework for building fast and flexible lists.

Stars13,070
Forks1,536
Last commit1 month ago
CollectionKitCollectionKit

Reimagining UICollectionView

Stars4,513
Forks265
Last commit3 years ago
DisplaySwitcherDisplaySwitcher

Custom transition between two collection view layouts

Stars2,301
Forks184
Last commit5 years ago
DwifftDwifft

Swift Diff

Stars1,849
Forks147
Last commit3 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub