# simpleboilerplates/swiftui-cheat-sheet

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/simpleboilerplates-swiftui-cheat-sheet).**

4,456 stars · 311 forks · MIT

## Links

- GitHub: https://github.com/SimpleBoilerplates/SwiftUI-Cheat-Sheet
- awesome-repositories: https://awesome-repositories.com/repository/simpleboilerplates-swiftui-cheat-sheet.md

## Description

This project is a reference guide and technical resource for building user interfaces with the SwiftUI framework. It provides a comprehensive collection of code examples, documentation, and a component library of reusable view implementations and layout patterns.

The resource includes a compatibility map that links modern declarative views to their equivalent imperative counterparts in the UIKit framework. This documentation assists with the migration from UIKit to SwiftUI by providing guidance on wrapping legacy view controllers and view subclasses within a declarative hierarchy.

The guide covers a wide range of interface capabilities, including the implementation of navigation structures, grid and stack-based layouts, and performant list rendering. It also details the use of interactive components for user input, gesture recognition, and the application of visual modifiers for styling.

## Tags

### Mobile Development

- [SwiftUI](https://awesome-repositories.com/f/mobile-development/ios-apple-ecosystem/swiftui.md) — Serves as a comprehensive technical resource and component library for building interfaces with the SwiftUI framework.
- [UIKit Interoperability](https://awesome-repositories.com/f/mobile-development/ios-apple-ecosystem/swiftui/uikit-interoperability.md) — Provides a compatibility map and guidance for migrating legacy UIKit views to SwiftUI.

### Education & Learning Resources

- [UI Framework Documentation](https://awesome-repositories.com/f/education-learning-resources/ui-framework-documentation.md) — Provides technical documentation on implementing performant stacks, grids, and lists.

### Software Engineering & Architecture

- [Value Change Triggers](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/change-detection/value-change-triggers.md) — Implements mechanisms for monitoring view state updates and triggering automatic UI re-renders when values change. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [UI Navigation Coordination](https://awesome-repositories.com/f/software-engineering-architecture/system-internals/centralization-patterns/workflow-execution-managers/complex-workflow-coordination/ui-navigation-coordination.md) — Includes a system for coordinating transitions between views and managing page titles in the navigation bar. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [Imperative-to-Declarative Bridges](https://awesome-repositories.com/f/software-engineering-architecture/imperative-to-declarative-bridges.md) — Provides architectural patterns for bridging imperative UI components into a declarative state-driven interface.

### User Interface & Experience

- [Action Buttons](https://awesome-repositories.com/f/user-interface-experience/button-styles/action-buttons.md) — Provides a collection of interactive buttons designed to trigger specific application logic and actions. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [View Hierarchies](https://awesome-repositories.com/f/user-interface-experience/composition-hierarchies/view-hierarchy-composition/view-hierarchies.md) — Provides comprehensive examples of organizing user interfaces using state-driven view hierarchies.
- [Grouped List Sections](https://awesome-repositories.com/f/user-interface-experience/custom-header-components/section-headers/grouped-list-sections.md) — Provides patterns for rendering lists organized into grouped sections with dedicated headers and footers. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [Declarative Component Libraries](https://awesome-repositories.com/f/user-interface-experience/declarative-component-libraries.md) — Offers a curated library of reusable declarative view implementations and layout patterns.
- [State-Driven UI Rendering](https://awesome-repositories.com/f/user-interface-experience/event-driven-state-managers/event-driven-state-synchronizers/ui-state-recomposition/state-driven-ui-rendering.md) — Demonstrates automatic view re-rendering driven by observed state changes to keep the interface in sync.
- [Gesture Recognition](https://awesome-repositories.com/f/user-interface-experience/gesture-recognition.md) — Provides a comprehensive guide to recognizing interaction patterns including single taps, long presses, and drag gestures. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [Image and Icon Display](https://awesome-repositories.com/f/user-interface-experience/image-and-icon-display.md) — Demonstrates how to display image assets and system icons using visual modifiers and custom styling. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [Input Collection Components](https://awesome-repositories.com/f/user-interface-experience/input-collection-components.md) — Implements a set of interactive controls for collecting user data via text fields, toggles, and pickers. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [Stack-Based Layout Containers](https://awesome-repositories.com/f/user-interface-experience/layout-management/component-layout-containers/stack-based-layout-containers.md) — Implements structural arrangements using vertical, horizontal, and depth-based stack containers.
- [Grid Layouts](https://awesome-repositories.com/f/user-interface-experience/layout-managers/grid-layouts.md) — Implements flexible vertical and horizontal grids with custom alignment and spacing. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [Modifier-Based Styling](https://awesome-repositories.com/f/user-interface-experience/modifier-based-styling.md) — Explains the use of visual modifiers to style components through declarative function chains.
- [Navigation Links](https://awesome-repositories.com/f/user-interface-experience/navigation-links.md) — Implements components for defining transitions and links that allow users to navigate the application hierarchy. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [Text Labels](https://awesome-repositories.com/f/user-interface-experience/text-labels.md) — Provides capabilities for rendering static or formatted text and combining strings with icons for labels. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [Declarative-Imperative Integration](https://awesome-repositories.com/f/user-interface-experience/declarative-imperative-integration.md) — Links modern declarative UI elements to legacy view equivalents to maintain compatibility. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [Large List Renderers](https://awesome-repositories.com/f/user-interface-experience/dynamic-list-rendering/virtualized-list-rendering/large-list-renderers.md) — Utilizes lazy loading for large collections to maintain high frame rates and stable memory usage. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [View Controller Embedding](https://awesome-repositories.com/f/user-interface-experience/external-controller-view-integration/view-controller-embedding.md) — Provides mechanisms to wrap external UIKit view controllers for use within declarative layouts. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [Geometric Shape Drawing](https://awesome-repositories.com/f/user-interface-experience/geometric-shape-drawing.md) — Provides examples for drawing rectangles, circles, and other geometric figures to create custom UI components. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [Navigation Structures](https://awesome-repositories.com/f/user-interface-experience/navigation-structures.md) — Details the implementation of navigation links, stacks, and tabbed containers to structure application flow.
- [View Background Stylings](https://awesome-repositories.com/f/user-interface-experience/presentation-frameworks/slide-layout-styling/gradient-backgrounds/folder-background-gradients/multi-renderer-view-backgrounds/view-background-stylings.md) — Provides guidance on setting image and gradient backgrounds to define the visual appearance of views. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [Tabbed Navigation](https://awesome-repositories.com/f/user-interface-experience/tabbed-navigation.md) — Ships tabbed navigation containers for switching between top-level views of the application. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))
- [View Grouping](https://awesome-repositories.com/f/user-interface-experience/view-grouping.md) — Implements view grouping mechanisms to organize layout logic and manage the number of views in a hierarchy. ([source](https://github.com/simpleboilerplates/swiftui-cheat-sheet#readme))

### Programming Languages & Runtimes

- [UI Component](https://awesome-repositories.com/f/programming-languages-runtimes/dynamic-class-creation/class-loading-mechanisms/lazy-loading/ui-component.md) — Details the implementation of lazy-loading containers to improve scrolling performance and memory usage.

### Part of an Awesome List

- [UI Components and Helpers](https://awesome-repositories.com/f/awesome-lists/devtools/ui-components-and-helpers.md) — Quick reference guide for common SwiftUI syntax and patterns.
- [Learning Resources](https://awesome-repositories.com/f/awesome-lists/learning/learning-resources.md) — Quick reference cheat sheet.
