OSS TanbouSign in with GitHub

access the UIKit or AppKit components underneath SwiftUI views through public APIs

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
6,559
Primary language
Swift
License
MIT
Repository last updated
Oct 6, 2026
On this page

Overview

SwiftUI Introspect locates the UIKit or AppKit components that SwiftUI uses internally. A ScrollView can expose its UIScrollView, a TextField its UITextField, and so on, allowing targeted customization when SwiftUI does not expose the underlying behavior directly.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Find the corresponding UIKit/AppKit instance between marker views

The introspect modifier inserts marker views around the selected SwiftUI view and searches the hierarchy between them for a matching UIScrollView or other platform component. It uses public APIs and defensively does nothing when the expected view cannot be found.

Sources: [2]

Declare supported OS versions explicitly to manage implementation changes

Typical calls list supported versions such as .iOS(.v17, .v18, .v26, .v27). Version 27.0.0 also exposes public range predicates such as .iOS(.v13...), but later OS versions may stop invoking the closure if SwiftUI changes the underlying platform type.

Sources: [2][4]

Best fit

Fits narrowly scoped UIKit/AppKit customization that SwiftUI modifiers do not expose

It is useful for behaviors such as scroll bouncing, text-field platform properties, and navigation-bar customization when native SwiftUI APIs are insufficient.

Sources: [2]

Before adoption

Version 27.0.0 uses Swift tools 6.2 and iOS 13+, and introspection should remain a fallback

Package.swift declares Swift tools 6.2, iOS/Mac Catalyst 13, macOS 12, tvOS 13, and visionOS 1 minimums. The README recommends preferring native SwiftUI modifiers and coding introspection closures defensively for repeated execution, OS differences, and retain cycles.

Sources: [3][2][4]

Official sources

  1. [1]siteline/swiftui-introspect — GitHub repository(2026-10-06)
  2. [2]SwiftUI Introspect 27.0.0 — README(2026-10-06)
  3. [3]SwiftUI Introspect 27.0.0 — Package.swift(2026-10-06)
  4. [4]SwiftUI Introspect 27.0.0 release(2026-10-06)
  5. [5]SwiftUI Introspect MIT license(2026-10-06)
Supplemental curator note

SwiftUI Introspect fits targeted platform customization that native SwiftUI modifiers do not expose. Treat underlying implementations as OS-dependent and keep version opt-ins and defensive code explicit.

Try it in 3 steps

  1. 1

    Add SwiftUI Introspect 27.0.0 with SwiftPM

    The 27.x line requires Swift tools 6.2 and supports iOS 13+.

    .package(url: "https://github.com/siteline/swiftui-introspect", exact: "27.0.0")
  2. 2

    Add SwiftUIIntrospect to the target

    Link the product from the target that needs access to underlying platform views.

    .product(name: "SwiftUIIntrospect", package: "swiftui-introspect")
  3. 3

    Customize the UIScrollView behind ScrollView

    Opt into iOS versions with a public range predicate and customize the underlying UIScrollView.

    import SwiftUIIntrospect ScrollView { Text("Item") } .introspect(.scrollView, on: .iOS(.v13...)) { scrollView in scrollView.bounces = false }
Check the official README

Growth

Growth trends · Last 30 days

6,559 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
6
Open PRs
1

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • appkit
  • inspect
  • inspection
  • introspection
  • nsview
  • nsviewcontroller
  • swiftui
  • uikit
  • uiview
  • uiviewcontroller
Stars
6,559
Forks
418
Watchers
55
Open issues
15
Contributors
37
Owner type
Organization
Primary language
Swift
License
MIT
Repository last updated
Oct 6, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?