今日已更新 224 条资讯 | 累计 41444 条内容
关于我们

iPhone Duo for iOS Developers: What Actually Changes in Your Swift Code

ArshTechPro 2026年09月10日 05:16 0 次阅读 来源:Dev.to

Apple announced the iPhone Duo today — its first foldable iPhone. A 5.4-inch outer display, a 7.6-inch inner display when you open it, ships with iOS 27.x. The marketing story is the hardware. The developer story is that a lot of assumptions baked into iPhone apps since 2007 just stopped being true. There is now more than one screen. The screen can change shape while your app is running. The safe area is no longer symmetric. And "portrait only" doesn't mean what you think it means anymore. The good news: if you've been doing adaptive layout properly for iPad, most of this is a short afternoon. If your app hardcodes screen sizes and branches on orientation, you have some work to do. Here's the practical version. First: what happens if you do nothing? Your app still runs. It doesn't crash, it doesn't get pulled. But how much of the screen you get depends on which SDK you last built against: Built with Inner display behavior Older SDK (no rebuild) Runs, but letterboxed — your app keeps its old aspect ratio, with black bars either side iOS 27 SDK Extends left of the status bar, avoiding the camera area iOS 27.1 SDK Full edge-to-edge, and standard nav/toolbar buttons lay out vertically So step zero is genuinely just: rebuild with Xcode 27.1. That alone moves you from "obviously not updated" to "fine." Everything below is the difference between "fine" and "good." The four poses you now have to support This is the mental model shift. It's not portrait vs landscape anymore. It's: Closed, portrait — behaves like a normal iPhone Closed, landscape Open, vertical (tall, near-square) Open, horizontal (wide) Plus the in-between states: partially folded like a book, or propped up in a tent on a table. Your layout has to survive all of them, and it has to survive transitions between them while state is live. Change #1: Size classes, not orientation This is the single most important line in Apple's guidance, and it will break the most apps. The inner display doesn't honor your suppo

本文内容来源于互联网,版权归原作者所有
查看原文