# aschuch/StatefulViewController

Placeholder views based on content, loading, error or empty states

Repository: https://github.com/aschuch/StatefulViewController
Canonical: https://ross.abutalabs.com/products/statefulviewcontroller
Language: Swift
License: MIT
License Family: permissive
Topics: uiviewcontroller, state-management, loading, error, empty, state, placeholder, swift
Last push: 2020-11-12T08:46:46+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4383, "days_push": 2120, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2111, forks 143 (observed 2026-08-28T04:06:14.316536+00:00)

## What it is
A Swift library providing a protocol for UIViewControllers and UIViews to display placeholder views based on content, loading, error, or empty states. It manages the state machine for showing and hiding the appropriate placeholder automatically.

## Use cases
- show loading spinner while fetching data in ios view controller
- display empty state view when no content available
- show error placeholder when network request fails
- manage view states in uitableview or uicollectionview
- add placeholder screens to custom uiviews

## When to choose
- building an iOS or tvOS app in Swift that needs loading/empty/error placeholder views
- you want a lightweight protocol-based approach instead of a full UI framework

## When to avoid
- building for Android or cross-platform frameworks
- using SwiftUI rather than UIKit
- you need actively maintained dependencies - last release was 2020

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, state-management
- domain: mobile-development, frontend
- platform: -
- tags: uikit, view-controller, placeholder-views, loading-states, swift, ios, mobile

## Member repositories
- aschuch/StatefulViewController (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:14.316536+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:53:43.187097+00:00, confidence not recorded.
  - readme: https://github.com/aschuch/StatefulViewController (fetched 2026-08-28T04:06:14.316536+00:00, sha a7d10b7232c2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
