/iphone-duo-skills:iphone-duo-barsfrom iphone-duo-skills
Prepares navigation bars, toolbars, and tab bars for iPhone Duo's vertical bar layout on outer and inner displays in landscape. Covers SwiftUI and UIKit APIs including axisBehavior, toolbarVerticalEdge, overflow menus, and compression.
Ships in iphone-duo-skills. 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; scripts run unread.
On the outer display and on the inner display in landscape, iPhone Duo moves controls that normally sit at the top and bottom to the side, keeping vertical space for content and controls within reach. Only the inner display in portrait keeps horizontal bars. Top to bottom the side stack is Dynamic Island, status bar, toolbar (with navigation buttons), tab bar. (Tech Talk 111462, 0:28; Tech Talk 111466, 5:07; HIG Designing for iPhone Duo › Vertical controls)
Read references/vertical-bars.md for the code; references/api-availability.md for
which parts compile with the selected SDK — axisBehavior, toolbarVerticalEdge,
compression behavior and the opt-out need the iOS 27.1 SDK, which ships with
Xcode 27.1, so on that toolchain they are a deployment-target question rather than a
blocked one; titles, symbols, badges, placements, visibilityPriority and
ToolbarOverflowMenu are iOS 27.0 and work on either. verticalBarEdge has no
UITrait class — observe it with
registerForTraitChanges(UITraitCollection.systemTraitsAffectingVerticalBarEdge).
Where the corner camera and the side controls physically sit:
references/device-geometry.md.
.toolbar inside NavigationStack
or NavigationSplitView. UIKit: UINavigationController and UITabBarController.
Standalone UIToolbar, UINavigationBar, UITabBar content is not considered.
(2:00)presentationPlacement(_:) with .leading or .trailing (UIKit:
sheetPresentationController?.preferredPlacement) moves a sheet to an edge, and
only a trailing sheet receives a vertical bar. .automatic is the default and
.center the fourth value. The bar's axis therefore follows the placement.
(3:58; Preparing your app for iPhone Duo › Optimize bars for vertical
presentation; PresentationPlacement documentation)
Booted (scripts/probes/sheet_inset_probe.swift): a sheet works out its own bar.
On the outer display it keeps the bar when the presenter opts out,
and an opted-out sheet leaves the presenter's bar in place.
On the inner display in landscape a centred or folded sheet has no bar,
while the presenter keeps one.
Read a sheet's own view for its inset and edge
(references/device-geometry.md › Sheets and pose pairs, measured).DUO007 finds standalone bars; move their items into the container.
A hand-built tab bar or toolbar never moves by itself — no API moves it
(Forums 847644). Migrate it first. A team that cannot migrate now still gets the
migration as a plan item — the long-term fix — with what the custom bar keeps
missing: overflow, compression, visibility priority and the inner display's
sidebar come only with TabView / UITabBarController (Forums 847644).
When it must stay custom for now (Forums 847835):
verticalBarEdge / toolbarVerticalEdge, observed through
systemTraitsAffectingVerticalBarEdge;view.layoutGuide(for: .bar(onEdge:extent:)) (UIKit,
27.1) or safeAreaBar(edge:) with a HorizontalEdge (SwiftUI, iOS 26).
Booted: a 56 pt trailing bar region sits inside the 84 pt trailing inset, below
the status-bar strip (120 pt on Xcode 27A9269, 124 pt on 27A9275) — the system
bar's own slot. .unspecified means no bar for this view, not for the display:
the window still reads an edge when a view controller opts out (Booted);.occlusion regions (Forums 847644);UILargeContentViewerInteraction, showsLargeContentViewer;
SwiftUI accessibilityShowsLargeContentViewer()).
Code: references/vertical-bars.md › A bar that must stay custom..cancellationAction / leading item groups
with leftItemsSupplementBackButton = false for close, and
.topBarPinnedTrailing / pinnedTrailingGroup for prominent actions. Keep
controls associated with the container they belong to. (4:29) Group related items
with ToolbarItemGroup / UIBarButtonItemGroup instead of manual spacing, and keep
controls next to the content they affect — Mail's list controls stay above the
leading pane. (HIG › Vertical controls)
A custom back button that only changes the chevron: set the back indicator image
on UINavigationBarAppearance and keep the system back button, which joins the
vertical bar by itself. A back item that really is custom (a custom view): set its
axisBehavior to .verticalPreferred and fit it to the bar's fixed width
(Forums 847875)..horizontalOnly, and keep related items on the same axis.
A custom view that has a vertical representation → .verticalPreferred. (8:00)toolbarVerticalEdge / verticalBarEdge. Flexible spacers collapse to zero
vertically; fixed spacers keep their minimum. Legible with no scroll edge effect
and with the Reduce Transparency background. (10:07)
Inside a toolbar item, switch the layout on the edge only for a .verticalPreferred item.
The value is the preferred edge for the whole window or presentation,
not the edge of the bar that holds the item.
Booted (SwiftUI): items in the horizontal bottom bar read .trailing,
so a label that stacks for every non-nil value stacks there too.
Keep the layout of an item in the horizontal bar side by side.
Views outside the toolbar read the edge as before.
UIKit's verticalBarEdge was not measured.
Code: references/vertical-bars.md › A custom item that joins the vertical bar.DUO011). A custom ellipsis menu is one of two things: a grab bag of secondary
actions — move it into ToolbarOverflowMenu / additionalOverflowItems so people
see one "more" instead of two — or a single named function such as Filter, which
deserves its own symbol and title so it can survive in the vertical bar. (11:40)
A confirmation for an overflow-menu item cannot anchor to the menu: drive
confirmationDialog from state that the item's action sets (Forums 847644).
For a dot or count on a tab, use a badge, not a UITabAccessory (Forums 847644)..prefersTabBar (toolbar compresses first). Task-oriented screens where actions
matter more than tabs: .toolbarVerticalCompressionBehavior(.prefersToolbarItems) /
verticalBarCompressionBehavior = .prefersBarItems. (12:23)
When the items do not fit, .prefersToolbarItems collapses the tab bar into one
control that shows the selected tab's symbol (Booted, outer display closed).
Tell the developer that the other tabs then go out of view.visibilityPriority on groups first, then items. Compose / New
Note / primary creation: high. Status-bearing items (badged inbox): high, to
preserve glanceability. Rare actions: low. Finer steps:
ToolbarItemVisibilityPriority(higherThan:) / (lowerThan:); UIKit's default is
.standard. (13:10)NavigationStack uses its top view, a TabView its selected tab, a
NavigationSplitView its trailing-most column; make it a stable choice, never a
toggle on a view's state, and use toolbarVisibility to hide bars instead.
Varying it by horizontal size class is legitimate only when the regular-width UI
really differs — Safari disables the vertical bar in regular width because its
tabs stack horizontally (Forums 847864). UIKit:
preferredVerticalBarBehavior, childForPreferredVerticalBarBehavior,
setNeedsUpdateOfVerticalBarConfiguration(). Otherwise don't override the default
placement; a full-width layout suits only immersive, non-scrolling screens that
don't conflict with the Dynamic Island or status bar. (HIG › Vertical controls;
Tech Talk 111466, 6:33)
Booted: the opt-out removes the 84 pt side inset, and a navigation title keeps
its 82 pt top bar either way. prefersStatusBarHidden removes only the clock and
leaves the column empty.
No scroll edge effect draws in the column, even when one is set for that edge,
so decide with the designer what content shows under it
(references/vertical-bars.md › Opt out).backgroundExtensionEffect() / UIBackgroundExtensionView
(iOS 26) rather than a manually stretched frame; scrollable foreground content
stays inset. (Preparing your app for iPhone Duo › Optimize bars for vertical
presentation; Tech Talk 111466, 6:33)NavigationStack toolbar adapts with no code: vertical on the outer display,
centred with a horizontal bar on the inner display, moved off the fold when
folded. No hinge code is needed for that. (Tech Talk 111466, 8:36)
.leading. Another is keeping the sheet on the side
of the item that opened it. Do that in regular width only, and leave compact
width .automatic. A pose-specific side follows the fold
(iphone-duo-layout, Forums 847797). The same-side pattern comes from a
third-party post (Nil Coalescing, 2026-10-04), not from Apple..cancellationAction; Button(role: .close) (iOS 26) supplies the standard
label.toolbarVerticalBehavior(.disabled)
to the top view inside the sheet's own NavigationStack. It resolves for that
presentation, so the presenter keeps its vertical bars (step 10;
toolbarVerticalBehavior(_:) documentation)..trailing sheets without explicit detents lose their
vertical bar, with controls under the status bar and camera. In book pose the
status display covered Close. Writing out presentationDetents([.large]), the
default detent, fixed it in that testing. Label it Unverified (Nil Coalescing,
2026-10-04): it is absent from the Xcode 27.1 RC release notes and was not
reproduced here. Recommend it only together with the P3/P5 check that shows
whether the app needs it. Never opt a screen out of vertical bars to hide the
collision. UIKit's equivalent, detents = [.large()], was not part of that
report.
Code: references/vertical-bars.md › Sheets.One recommendation per screen (not per item) in the format of
references/recommendation-format.md, listing the checklist steps that apply. Items
that need 27.1 APIs are marked blocked when the SDK lacks them; everything else can
ship now and improves bars on every iPhone.
Pose matrix P1 (outer display: side controls), P2 (outer display landscape, keyboard
up), P3 (inner landscape: vertical bar), P4 (inner portrait: horizontal), P11 (right-to-left), P12 (Reduce Transparency)
from references/pose-test-matrix.md.
Check which items overflow and in what order.
Check whether the tabs collapse into one control.
Check that each custom label stacks only in the vertical bar.
For each sheet, present it in P1, P3 and P5. Check that a trailing sheet's top control
sits below the status-bar strip, and that an opted-out sheet leaves the presenter's
bars vertical.
scripts/duo_pose.py shoot <dir> --poses closed,closed-landscape,closed-landscape-flipped,flat,flat-portrait
captures P1, both P2 orientations, P3 and P4 with both displays
(third-party hinge CLI 0.3.0 or later; ask first).
In one P2 orientation the vertical bar is on the leading edge.
evals/evals.json (opens in a new tab)evals/files/InboxToolbar/Inbox/InboxScreen.swift (opens in a new tab)evals/files/Lumen/Lumen/RootViewController.swift (opens in a new tab)evals/files/Shelf/Shelf/BookDetailViewController.swift (opens in a new tab)evals/files/Sketchpad/Sketchpad/CanvasScreen.swift (opens in a new tab)evals/files/StoreFront/Store/ProductScreen.swift (opens in a new tab)evals/files/Trailhead/Trailhead/BoardScreen.swift (opens in a new tab)evals/trigger-evals.json (opens in a new tab)references/api-availability.md (opens in a new tab)references/device-geometry.md (opens in a new tab)references/pose-test-matrix.md (opens in a new tab)references/recommendation-format.md (opens in a new tab)references/sources.md (opens in a new tab)references/vertical-bars.md (opens in a new tab)scripts/duo_pose.py (opens in a new tab)scripts/duo_scan.py (opens in a new tab)scripts/sdk_api_check.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub alexey1312/iphone-duo-agent-skill --plugin iphone-duo-skills5 skills in this plugin
/iphone-duo-adaptivity-auditFind and fix legacy screen, orientation, idiom and lifecycle code that breaks on iPhone Duo's inner display and in other iOS 27 resizable environments (iPhone Mirroring, iPhone apps on iPad, Split View). Use when a developer asks about UIScreen.main or mainScreen, screen bounds or scale, interfaceOrientation or UIDevice orientation checks, userInterfaceIdiom layout forks, keyWindow or connectedScenes.first, migrating from app lifecycle to UIScene lifecycle (required with the latest SDK), UIRequiresFullScreen, a missing launch screen (ITMS-90870), portrait-only apps, or hard-coded Face ID strings and symbols (iPhone Duo has Touch ID; branch on LAContext.biometryType). Covers SwiftUI and UIKit, ships a read-only scanner, and delegates bulk UIKit rewrites to Xcode's own modernization skill when available. Not for app features that merely touch UIScreen or orientation, such as screen brightness, deliberately locking a game to one orientation, or camera and sensor setup./iphone-duo-displaysUse iPhone Duo's hinge, two displays, two front cameras and multiple windows in SwiftUI and UIKit apps. Use when a developer asks about the hinge angle or fold state, onHingeChange or UIHingeInteraction, interactions driven by folding, Split View multitasking or the stacked video layout on iPhone Duo, multiple scenes or windows on iPhone, requestSceneSessionActivation errors on the outer display, UIWindowSceneActivationAction, scene accessories, sceneAccessory, CameraCaptureAccessory, a teleprompter or subject preview on the outer display, the virtual front camera, AVCaptureDeviceDirectionCoordinator and cameras that change direction when the device opens or closes, preview mirroring, or a widget so the app appears in StandBy on the outer display. Based on Apple's "Leverage multiple displays and scenes" and "Build a great camera experience for iPhone Duo". Not for column widths, safe areas or content around the fold (layout) or toolbar items (bars)./iphone-duo-layoutUse when an app's layout or geometry breaks or wastes space on iPhone Duo's foldable inner display: layouts that should become multi-column in regular × regular size classes, NavigationSplitView or TabView sidebars, a phone-width column stuck in the middle, asymmetric safe-area insets, content under the side bar or the keyboard in Split View, content, floating controls, sheets, collection-view sections or WKWebView pages crossed by the hinge in book or tabletop pose, the FaceTime camera covering UI, or video letterboxing on the wide inner screen. Also use it for the iOS 27.1 layout APIs: reservedRegions (division, occlusion, right-to-left mirroring), ReservedRegion / UIView.ReservedRegion, ArrangementView / UIArrangementViewController split or overlay with their ratio, edge and axis modifiers, and corner-aware margins. Not for toolbar items or overflow menus, removing idiom or orientation checks, hinge-angle interactions, or generic SwiftUI and Auto Layout bugs unrelated to the foldable./iphone-duo-readinessEnd-to-end readiness workflow for iPhone Duo, Apple's foldable iPhone with an outer display and a regular-by-regular inner display. Use when a developer wants to prepare, audit, plan or test a SwiftUI or UIKit iOS app for iPhone Duo, the iOS 27 / 27.1 SDK resizable-app changes, foldable poses and the hinge, vertical bars, Device Hub pose simulation, Apple's "Prepare your app for iPhone Duo" guidance, or what an iPhone Duo submission owes App Store Connect (screenshots for both displays, the April 2027 deadlines). Runs a read-only scan and SDK check first, produces a tiered plan with session citations, changes code only after itemized approval by delegating to the iphone-duo specialist skills, and verifies against a pose matrix.