Logo Iphone Duo Dual Pane Patterns

Iphone Duo Dual Pane Patterns

Cộng đồng
mirzaaghazadeh
iphone-duo-dual-pane-patterns

Thiết kế và xây dựng trải nghiệm hai vùng cho iPhone Duo — kích thước thực tế theo pixel và point của từng màn hình và mỗi nửa màn hình, các kiểu chính xác của callback bản lề (onHingeChange / UIHingeInteraction), hiệu ứng dựa trên bản lề, cách ánh xạ tư thế sang bố cục (khung nội dung đi kèm, chế độ xem kép, danh sách-chi tiết, nút điều khiển khi đặt trên bàn), màn hình trả phí hai vùng và hướng dẫn làm quen thích ứng với phần gập. Dùng khi cần xác định kích thước bố cục hoặc tài nguyên cho iPhone Duo, kết nối callback bản lề, chọn nội dung cho từng vùng hoặc thiết kế quy trình làm quen và mua hàng trải dài qua phần gập.

Add to TypingMind

Tổng quan

Nhà phát hànhmirzaaghazadeh
Kho mãiphone-duo-skills
Tên kỹ năngiphone-duo-dual-pane-patterns
Sao
188
Bản fork
9
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được mirzaaghazadeh công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Iphone Duo Dual Pane Patterns trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/mirzaaghazadeh/iphone-duo-skills/tree/main/skills/iphone-duo-dual-pane-patterns
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mirzaaghazadeh/iphone-duo-skills.git /tmp/iphone-duo-skills
mkdir -p .claude/skills
cp -r /tmp/iphone-duo-skills/skills/iphone-duo-dual-pane-patterns .claude/skills/iphone-duo-dual-pane-patterns
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Iphone Duo Dual Pane Patterns trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Iphone Duo Dual Pane Patterns ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Iphone Duo Dual Pane Patterns với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Dual-pane patterns, dimensions and hinge callbacks

The sibling skills explain the platform: reserved regions and arrangements in ../iphone-duo-adaptive-layout/SKILL.md, the hinge and scenes in ../iphone-duo-hinge-and-scenes/SKILL.md, design principles in ../iphone-duo-design-review/SKILL.md. This one is the applied layer: the numbers you'll want when mocking up or sizing assets, the exact shapes of the hinge callbacks, and the proven patterns for what to put in each pane — drawn from Apple's material plus a decade of dual-screen guidance from Microsoft (Surface Duo), Google (Android foldables) and Samsung (Flex Mode), which all converge on the same answers.

The numbers

From Apple's published specs. Use them for mockups, asset budgets and sanity checks — never as layout constants. Layout reads size class, safe area and reserved regions at runtime.

Outer displayInner display (open)Each half of the inner display
Diagonal5.4 in7.6 in—
Points (w × h, as held)466 × 678 portrait951 × 669 landscape475.5 × 669 portrait
Pixels (w × h, as held)1398 × 2034 portrait2670 × 1878 landscape≈1335 × 1878 portrait
Density460 ppi430 ppi430 ppi
Aspect ratio≈1.45 : 1 (tall)≈1.42 : 1 (wide)≈1.41 : 1 (tall)
Size classcompact × regular (portrait), compact × compact (landscape)regular × regular, any orientation—

Apple lists the inner panel as "1878-by-2670"; open, the device is wider than tall (164.6 × 117.8 mm), so the natural open posture is landscape.

Three consequences worth internalising:

  1. The inner display is the outer display turned sideways, near enough. Both are ≈1.4–1.45 : 1, which is why Apple describes them as sharing one aspect ratio.
  2. Each half of the inner display is roughly one outer display. A phone-shaped UI fits one half; the other half is additional. That is the whole design thesis: one familiar pane plus one extra pane, not one stretched phone UI.
  3. The fold runs down the middle of the long edge when open, so default two-pane layouts are side by side, and tabletop layouts are top/bottom.

Points

Apple's Tech Specs list pixels only. The point sizes come from the iPhone Duo templates in Apple's iOS and iPadOS 27 design resource (as reproduced in Noah Elhadedy's community iPhone Duo Adaptive Design Starter Kit, aligned to Apple's templates on 23 September 2026):

  • Outer: 466 × 678 pt — exactly the 1398 × 2034 panel at 3×.
  • Inner: 951 × 669 pt (669 × 951 in portrait). That is not an exact 3× of the 2670 × 1878 panel: the system renders at 2853 × 2007 (the App Store Connect screenshot size) and downsamples, like iPhone 6 Plus did. Export inner-display assets at 3× of the point size, not from the panel pixels.
  • The fold sits at 475.5 pt from the edge — the centre of 951 — in both orientations.

Still confirm in the Xcode 27.1 simulator; read GeometryProxy.size or scene bounds rather than hardcoding any of this.

Layout tokens (pt)

For mockups and for sanity-checking what the system gives you at runtime. The Source column matters: only Apple values come from Apple's design resource; kit values are design choices from the community starter kit that you're free to change.

Safe areas — asymmetric by design; never mirror one side onto the other.

StateTopBottomLeadingTrailingSafe content sizeSource
Outer portrait00084 (vertical bar)382 × 678Apple
Outer landscape00084, on the camera edge594 × 466Apple
Inner landscape (flat or book)00084 (vertical bar)867 × 669Apple
Inner portrait (flat or tabletop)84 (status + top bar)95 (tab bar)00669 × 772Apple

Horizontal bars return only on the inner display in portrait. Everywhere else, navigation, toolbar and tab bar share one 84 pt vertical bar in the order back → prominent action → toolbar groups → tab bar, top to bottom.

Bars and controls

ElementSizeSource
Vertical bar width84 ptApple
Horizontal navigation bar / toolbar (inner portrait)48 pt tallApple
Horizontal tab bar (inner portrait)95 pt tall insetApple
Bar button / prominent bar button36 pt / 48 ptApple
Touch target44 × 44 pt default, 28 × 28 pt minimumApple HIG

Margins, gaps, fold

TokenValueSource
Layout margin, both displays20 ptApple
Division region width when flat0 ptApple
Division region width when foldednot published — read ReservedRegion.frame—
Fold avoidance band (mockups)27 pt, centred on 475.5 ptkit
Gap between panes16 pt outer, 24 pt innerkit
Max width for running text600 ptkit

Columns — Apple asks for an even count; the counts themselves are kit values.

StateColumnsGutter
Outer portrait416
Outer landscape616
Inner portrait624
Inner landscape824
Inner, book-folded4 + 4, meeting at the fold, none on it24

Typical pane widths inside the 867 pt inner-landscape safe area (kit): list 300–320 + detail 546–566; sidebar 280; player/primary ≈462 (one half) + context ≈404. Keep a pane's content close to its outer-display size rather than stretching it.

Physical

OpenClosed
Width × height164.6 × 117.8 mm84.1 × 117.8 mm
Thickness5.2 mm11.3 mm
Weight254 g254 g

Biometrics are Touch ID in the side button — no Face ID. Any flow that says "Face ID" or uses a face glyph needs to branch on LAContext.biometryType. No LiDAR is listed: features built on RoomPlan or scene depth need a fallback on this device.

Hinge callbacks — exact shapes

All iOS 27.1 (beta at time of writing), verified against Apple's symbol docs.

SwiftUI

swift
nonisolated func onHingeChange(
    isEnabled: Bool = true,
    _ action: @escaping (DeviceHingeContext, DeviceHingeContext) -> Void
) -> some View
TypeMemberType of memberNotes
DeviceHingeContexthingeDeviceHinge?nil → the device has no hinge
DeviceHingeangleAngleuse .degrees / .radians
DeviceHingestatusDeviceHinge.Status
DeviceHinge.Status.closed, .partiallyOpen, .fullyOpenstruct with static membersEquatable, so switch works, but you need a default

The closure receives (old, new). Use isEnabled: to stop updates when an effect is off-screen instead of ignoring them in the closure.

UIKit

swift
init(updateHandler: (UIHingeInteraction, UIHingeInteraction.Update) -> Void)
var isEnabled: Bool
TypeMemberType of memberNotes
UIHingeInteraction.UpdatehingeUIHinge?nil when the view leaves a hierarchy that provides hinge updates
UIHingeangleCGFloatradians, not degrees
UIHingestatusUIHinge.Status
UIHinge.Status.closed, .partiallyOpen, .fullyOpen, .unknownenum (Int raw value)UIKit has a fourth case SwiftUI doesn't

The UIKit handler is not an (old, new) pair. It fires when the hinge changes and when the interaction moves between hierarchies. Keep your own previous value if you need a delta.

Rules Apple states in the reference

  • Status is decided by the system from angle and device orientation. Don't re-derive it from angle thresholds — there is no documented "closed below N°".
  • Update rate and precision are system policy and can change with system state. Don't assume a frequency; interpolate or animate towards the latest value rather than treating each callback as a frame.
  • If you only need closed / partial / open, use status, not angle.
  • The angle range isn't documented. Don't assume flat is exactly 180° — treat .fullyOpen as your upper bound and normalise against it.

A reusable normaliser

swift
/// 0 = closed, 1 = fully open. Effects read this; nothing lays out from it.
@Observable final class HingeProgress {
    var value: Double = 1          // no hinge → behave as if flat
    var isPartial = false
    private var maxSeen: Double = .pi

    func update(_ hinge: DeviceHinge?) {
        guard let hinge else { value = 1; isPartial = false; return }
        let radians = hinge.angle.radians
        switch hinge.status {
        case .closed:
            value = 0; isPartial = false
        case .fullyOpen:
            maxSeen = max(maxSeen, radians)
            value = 1; isPartial = false
        default: // .partiallyOpen
            value = min(max(radians / maxSeen, 0), 1); isPartial = true
        }
    }
}

// usage
.onHingeChange(isEnabled: effectVisible) { _, new in progress.update(new.hinge) }

The UIKit equivalent reads update.hinge?.angle (already radians) and must add a case .unknown: that leaves the last value untouched.

Pose → pattern

There is no "laptop" or "tent" status. Poses are what the user does; your code sees size class, reserved regions and hinge status. Map them like this:

PoseWhat your code observesPattern
Closedouter display, compact widthThe phone app you already have. Secondary pane collapses to a sheet or a push.
Open flatregular × regular, division region inactive (zero width)Two panes side by side, media may cross the centre.
Book (partly folded, inner landscape)division region active and taller than wideTwo panes, left/right. Nothing interactive in the curve.
Tabletop / laptop (partly folded, inner portrait)division region active and wider than tallContent in the raised half, controls in the flat half.
Tentpartially open, often flippedHands-free viewing; don't rely on touch.

Detect orientation of the fold from the region, not the hinge:

swift
GeometryReader { proxy in
    let fold = proxy.reservedRegions(kind: .division).first { $0.isActive }
    let isTabletop = fold.map { $0.frame.width > $0.frame.height } ?? false
    // …
}

Better still, let ArrangementView with .split choose the axis for you — it splits horizontally when wider than tall and vertically when taller than wide, which is the book-vs-tabletop decision.

The five patterns that work

Microsoft's dual-screen taxonomy, reconciled with Apple's containers:

PatternLeft / top paneRight / bottom paneApple containerGood for
Companion paneCanvas (photo, room, document)Tools, library, properties, promptArrangementView(.split)Editors, creative tools
Dual viewVersion A (original)Version B (result)Two columns on regular widthBefore/after, diffs, compare variants
List-detailListDetail, updates on tapNavigationSplitViewBrowsing catalogs, styles, messages
Extended canvasOne image spanning both panes—full-bleed + reserved regions for overlaysMaps, panoramas, video
Tabletop controlsMedia, no buttonsJoystick, sliders, actionsArrangementView(.split) / .overlayHands-free viewing, showroom, playback

Pick by content relationship, not by pose: companion = one thing + its tools; dual view = two versions of one thing; list-detail = many things + one.

Six rules that come from all four vendors

  1. Mask media, split controls. Photos and video may run across the fold. Buttons, text and inputs never sit on it. The only exception is a drag in progress — a dragged card may cross the fold while the finger is down.
  2. Don't stretch. Each half is phone-shaped. Doubling font size or button width across 2670 px is the canonical failure. Use an even column count so nothing straddles the centre.
  3. Tabletop: content up, controls down. The raised half is for looking, the flat half is for touching. Nothing interactive near the fold.
  4. Tools go right (or bottom) of the canvas — thumb side for most users, and where iOS 27.1 already puts the vertical bar.
  5. Two screens = compare. If the app has any before/after or variant choice, the fold is the natural divider; a single-screen slider is no longer needed.
  6. State survives the fold. Opening and closing resizes the scene; it isn't torn down. Scroll position, in-progress text and the current step live in the model, not in view @State that a layout swap discards. Dialogs stay within one half.

Hinge-driven effects

The hinge is for effects and interactions, never layout. Effects that earn their place:

  • Hinge as a handle. Map normalised progress to a reveal — a door swinging open onto a scene, a cover lifting, a camera pushing in. The user's hand is the animation. Keep it an overlay under a second long, never blocking input, and on .fullyOpen finish the transition and remove the overlay.
  • Close to save. On .closed, persist and show a short confirmation on the outer display. Pairs naturally with the reveal running in reverse.
  • Parallax pitch. Combine CoreMotion tilt (yaw/roll) with hinge progress (pitch) to move 2.5D layers — a depth map split into 3–4 layers is enough. Clamp amplitude to avoid motion sickness.
  • Continuous controls. Anything a lever or whammy bar could drive.

Always:

  • Guard nil hinge (most devices) and give those users the end state.
  • Reset in the else branch when leaving .partiallyOpen, so effects don't stick at a stale angle.
  • Honour Reduce Motion — swap the reveal for a crossfade.
  • Pass isEnabled: false when the effect isn't on screen.

Purchase and paywall screens

  • Sheets avoid the fold on their own, so a sheet paywall lands in one half. To span both panes, present a full-screen cover with your own two-column layout: value proposition (ideally the user's own result, animated) in the left pane, plans and the purchase button entirely in the right pane.
  • Price, button and legal copy stay together in one pane. Never split the price from the button across the fold, and never run the button through it.
  • On the outer display, fall back to one column; SubscriptionStoreView handles trial badges and renewal wording for you there.
  • App Review 3.1.2 still governs: the billed amount is the most prominent element, trial wording is secondary, the renewal period is explicit, restore purchases is reachable, and the close button is visible immediately.
  • Folding is not a dismissal. Don't treat a close/open during a paywall as "user declined" for exit-offer logic; the scene was only resized.
  • Tabletop-triggered paywalls should keep the tabletop shape: preview up top, plans on the flat half.

Fold-aware onboarding

  1. Never require opening the device. Invite it — "open to step inside" — and continue on the outer display after a few seconds if the user doesn't. People hold Duo closed a lot.
  2. Opening at any step expands that step into two panes. It never restarts the flow. This is the state-survives-the-fold rule applied to onboarding.
  3. Reach the "aha" before asking for permissions or money. Permission priming screens go directly before the system prompt, at the moment of need, with a "not now".
  4. Ask for notifications after the paywall, attached to a concrete promise (for example, "we'll remind you before your trial ends").

Test matrix

Run every two-pane screen through this in the Xcode 27.1 Device Hub simulator, dragging the hinge slider slowly through each transition:

ClosedBook (slider mid-way)Open flatTabletopSplit View, leftSplit View, right
No letterboxing☐☐☐☐☐☐
Nothing tappable in the fold—☐—☐——
State kept across the transition☐☐☐☐☐☐
Hinge effect resets / no-hinge path works☐☐☐☐——
Paywall price + button in one pane☐☐☐☐☐☐

Also run once on a non-foldable simulator to exercise the nil-hinge path.

Câu hỏi thường gặp

Kỹ năng AI Iphone Duo Dual Pane Patterns làm được gì?

Thiết kế và xây dựng trải nghiệm hai vùng cho iPhone Duo — kích thước thực tế theo pixel và point của từng màn hình và mỗi nửa màn hình, các kiểu chính xác của callback bản lề (onHingeChange / UIHingeInteraction), hiệu ứng dựa trên bản lề, cách ánh xạ tư thế sang bố cục (khung nội dung đi kèm, chế độ xem kép, danh sách-chi tiết, nút điều khiển khi đặt trên bàn), màn hình trả phí hai vùng và hướng dẫn làm quen thích ứng với phần gập. Dùng khi cần xác định kích thước bố cục hoặc tài nguyên cho iPhone Duo, kết nối callback bản lề, chọn nội dung cho từng vùng hoặc thiết kế quy trình làm quen và...

Vì sao nên dùng Iphone Duo Dual Pane Patterns trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Iphone Duo Dual Pane Patterns là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Iphone Duo Dual Pane Patterns trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/mirzaaghazadeh/iphone-duo-skills/tree/main/skills/iphone-duo-dual-pane-patterns. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Iphone Duo Dual Pane Patterns?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Iphone Duo Dual Pane Patterns với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Iphone Duo Dual Pane Patterns với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Iphone Duo Dual Pane Patterns có miễn phí không?

Kỹ năng này được mirzaaghazadeh phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇