/apple-apps:presenting-ios-modalsfrom Apple Apps
Builds or reviews SwiftUI and UIKit modal sheets with proper navigation chrome, button roles, detents, and dismissal handling.
Ships in Apple Apps. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this alongside your SwiftUI or UIKit implementation skills when a screen is presented modally, especially when it has a navigation bar, a close button, a save/done action, or sheet detents.
Current Apple guidance:
Use the real navigation bar for modal chrome whenever the presentation needs a title, close/cancel
button, primary action, or future back button. Use UINavigationController for UIKit flows or NavigationStack for SwiftUI flows when they need hierarchical navigation; preserve the app’s existing presentation ownership.
Do not draw an in-content header to replace a navigation bar. A custom header is only appropriate for a surface that truly has no navigation bar, such as a compact custom picker. If that header contains a close affordance, keep it on the leading side.
Pick the button by role before choosing placement:
Avoid showing Back, Close/Cancel, and Done together. Multi-step sheets can vary controls by step, but each step should have one clear escape path and one clear completion path when completion is available.
If dismissal can lose user-generated content, guard both the close button and interactive dismissal with the same confirmation path.
SwiftUI modal close:
@Environment(\.dismiss) private var dismiss
// …
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button(String(localized: "Close")) {
dismiss()
}
}
}
UIKit modal close:
navigationItem.leftBarButtonItem = UIBarButtonItem(
systemItem: .close,
primaryAction: UIAction { [weak self] _ in
self?.dismiss(animated: true)
}
)
Pair a leading close/cancel with a trailing completion action when the task has an explicit commit:
ToolbarItem(placement: .confirmationAction) {
Button(String(localized: "Save")) {
viewModel.save()
}
}
navigationItem.rightBarButtonItem = UIBarButtonItem(
title: String(localized: "Save"),
style: .done,
target: self,
action: #selector(saveButtonTapped)
)
Choose detents by task shape:
Configure sheets through UISheetPresentationController (or SwiftUI's presentationDetents family), and
centralize the configuration — detents, grabber state, edge attachment, undimmed behavior,
interactive-dismissal policy, and background — in one shared site per app rather than repeating it at
every call site. One-off per-controller configuration is where inconsistent chrome and dismissal behavior
come from.
Edge-attached sheets default to full width. Set widthFollowsPreferredContentSizeWhenEdgeAttached: true only
when a compact-height sheet should intentionally narrow to a nonzero preferred content width.
For content-sized sheets — a custom detent that resolves to the content's natural height — add .large()
or another expandable detent only when the flow benefits from expansion, and let the grabber default
follow whether expandable detents exist. Handle keyboard-aware sizing in the shared configuration site,
not per feature.
For a custom content-sized sheet, identify which layer measures content and which layer owns scrolling. Some app containers require unbounded hosted content for measurement; standard SwiftUI sheets can contain ScrollView or List. Follow the actual container contract and test keyboard, Dynamic Type, and detent changes. Avoid nested competing scroll owners.
Keep modal navigation chrome in the framework that owns the flow unless an existing bridge requires otherwise.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
7 skills in this plugin
/configuring-ios-contentConfigure UIKit cell content, backgrounds, empty states, and SwiftUI hosting. Use proactively for cell registration, configuration updates, reuse, or legacy cell-label migration./implementing-app-intentsBuild or debug App Intents, entities, queries, and system integrations. Use proactively for Siri, Shortcuts, Spotlight, widgets, controls, or Apple Intelligence integration./instrumenting-accessibility-identifiersAdd or audit typed accessibility identifiers and XCUITest selectors in SwiftUI or UIKit. Use proactively for automation contracts and selector migration; not a general VoiceOver audit.npx claudepluginhub kylehughes/agent-plugins-for-making-good-software --plugin apple-appsOther plugins' skills for the same job