What's New in UIKit in iOS 27

A tour of the new UIKit APIs in iOS 27 — TextKit 2 tables, scene accessories, Liquid Glass bar minimization, menus, and more — found by diffing the SDK headers.

A quick run down of the UIKit changes in iOS 27, derived from diffing the public UIKit.framework headers between the iOS 26.2 SDK (Xcode 26.2) and the iOS 27 SDK (Xcode 27 beta), plus looking at the WWDC26 sample Enriching your text in text views (video), example code.

iOS 27's UIKit is a tiny release in terms of API changes, but does have some changes. There are no new top-level paradigms, but there's an new addition to TextKit 2, a new scene accessory API, Liquid-Glass-era bar minimization controls, and a small amount of quality-of-life additions to menus, tab bars, and drag interactions.

Full ObjC API Diff of UIKit from iOS 26.2 to iOS 27 (beta 1): gist.github.com


1. TextKit 2 grows: tables, viewport rendering, and attachment reuse

This is the main new feature in UIKit for iOS 27, and is what the WWDC26 TextKit sample code showcases.

Real tables in attributed text

UIKit gained a full NSTextBlock / NSTextTable / NSTextTableBlock family (long available on macOS, now on iOS), and NSParagraphStyle / NSMutableParagraphStyle picked up a textBlocks property to attach them:

let table = NSTextTable()
table.numberOfColumns = 3
table.layoutAlgorithm = .automatic

let cell = NSTextTableBlock(
   table: table,
   startingRow: 0,
   rowSpan: 1,
   startingColumn: 0,
   columnSpan: 1
)

let style = NSMutableParagraphStyle()
style.textBlocks = [cell]   // 🆕 iOS 27

A viewport rendering surface API

UITextView now conforms to NSTextViewportLayoutControllerDelegate and exposes a set of overridable hooks so you can decorate or react to layout as the viewport scrolls — without recomputing the whole document.
The new surface protocols are NSTextViewportRenderingSurface and NSTextViewportRenderingSurfaceKey, and the new UITextView methods are:

textViewportLayoutControllerWillLayout(_:) // and …DidLayout(_:)
textViewportLayoutController(_:configureRenderingSurfaceFor:)
textViewportLayoutControllerReceivedSetNeedsLayout(_:)
viewportBounds(for:)

The sample uses these to implement section collapsing (hiding body paragraphs under a collapsed header) and a line-number gutter that stays in sync while scrolling:

final class CollapsibleTextView: UITextView, NSTextContentStorageDelegate {

    override func textViewportLayoutController(
        _ controller: NSTextViewportLayoutController,
        configureRenderingSurfaceFor fragment: NSTextLayoutFragment)
    {
        super.textViewportLayoutController(controller, configureRenderingSurfaceFor: fragment)
        // Position disclosure chevrons relative to the current viewport.
    }

}

Reusable attachment view providers

Previously, NSTextAttachmentViewProvider-backed views were recreated as they scrolled in and out of view. iOS 27 adds a reuse policy so a provider (and its rendering surface) survives scrolling and edits.

UITextView gains registerTextAttachmentViewProviderReusePolicy(_:forTextAttachmentViewProviderType:), configured with the new UITextAttachmentViewProviderReusePolicy option set, and NSTextLayoutManagerDelegate gains cache/retrieve hooks:

textView.register(
    [.onScrollingOutOfViewport, .onEditingInlineParagraphs],   // UITextAttachmentViewProviderReusePolicy
    forTextAttachmentViewProviderType: AnimatedAttachmentViewProvider.self
)

This is what lets the sample keep an AVPlayer-backed inline attachment alive (and playing) as you scroll.


2. Scene accessories & closure confirmation

iOS 27 introduces a model for attaching accessories to scenes and for confirming before a scene closes.

let registration = viewController.registerSceneAccessory(accessory)
// …later
viewController.unregisterSceneAccessory(registration)

Plus a factory for external, non-interactive accessories: UISceneAccessory.externalNonInteractive(sceneConfiguration:userInfo:), surfaced back to you via UISceneConnectionOptions.sceneAccessoryUserInfo.

let closeAction = UIAlertAction(title:"End meeting for all", style:.destructive, handler: nil)

let cancelAction = UIAlertAction(title:"Stay in meeting", style:.cancel, handler:nil)

let myAction = UIAlertAction(title:"Leave & Assign new host", style:.default, handler: { action in
   // work to do before the window closes
})

var closureConfirmation: UISceneClosureConfirmation = UISceneClosureConfirmation(
   title:"Leave or End meeting?",
   message:"You are the host. Would you like to end the meeting for all participants?",
   actions: [closeAction, cancelAction, myAction]
)
windowScene.closureConfirmation = closureConfirmation

3. Display links move to the scene

Tied to the multi-scene push above, the display-link APIs on UIScreen and UIApplication are deprecated in favor of a scene-scoped equivalent:

// Deprecated in iOS 27:
screen.displayLink(target:selector:)

// Use instead:
windowScene.displayLink(target: self, selector: #selector(step))

4. Liquid Glass bars: minimization & flexible buttons

The Liquid Glass navigation/toolbar story continues with controls for how bars minimize and how bar buttons prioritize space.

UIBarButtonItemVisibilityPriority, a comparable type with init(higherThan:) / init(lowerThan:)) and paddingRemoved for tighter custom layouts.

// UIBarMinimizeBehavior
navigationItem.barMinimizeBehavior = UIBarMinimizeBehavior.onScrollDown

// UIBarButtonItemVisibilityPriority
saveButton.visibilityPriority = UIBarButtonItemVisibilityPriority(higherThan: shareButton.visibilityPriority)

5. Menus: image visibility, subtitles, and live highlighting

UIMenuElement (and the UIMenuLeaf protocol) gained:

action.preferredImageVisibility = .hidden
action.subtitle = "Sends a copy to your team"

6. Tab bars & sidebars


7. Drag, pointer, and a new look-to-scroll interaction


Other changes from Apple's release notes

Apple's iOS & iPadOS 27 release notes also call out a few behavior changes and adoption requirements that don't really show up as a simple header diff:

  • State restoration can be extended across background-to-foreground scene transitions. When linked against the iOS 27, tvOS 27, macCatalyst 27, or visionOS 27 SDKs, UIScene.extendStateRestoration and UIScene.completeStateRestoration can cover UIScene.ActivationState.background to UIScene.ActivationState.foreground lifecycle transitions.

  • A launch screen is now required for App Store submission. iOS and iPadOS apps built with the 27.0 SDK or later need one of UILaunchStoryboardName, UILaunchStoryboards, UILaunchScreen, or UILaunchScreens in Info.plist; apps without a launch screen are rejected once App Store Connect starts accepting 27.0-SDK builds.

  • Siri / Apple Intelligence can load drag interaction resources. On iOS 27.0 and iPadOS 27.0, the system can call UIDragInteractionDelegate methods from places like Apple Intelligence invoked via a context menu, even without a user-started drag gesture. If your dragInteraction(_:sessionWillBegin:) performs drag animations or presents modal UI, move that work to dragInteraction(_:sessionDidMove:).

  • Presented view controllers inherit traits through the presentation view hierarchy. In apps built with the iOS 27.0 SDK, UIKit walks up the presented view controller's view superview chain through the intermediate presentation views, instead of jumping straight to the presentation controller. Custom UIPresentationController subclasses, or presented controllers that relied on traits coming directly from the presentation controller, may need explicit trait propagation or overrides.

  • Menu images are less visible by default on iPadOS 27.0 and macOS 27.0. Menu bars and context menus show a reduced set of item images, and images set on menu elements are hidden by default unless you opt in with UIMenuElement.preferredImageVisibility or the updated UIMenu, UIAction, UICommand, and UIKeyCommand initializers. UIKit still provides visible default images for some common system-wide items such as Settings, Share, and Print.

  • Center-placed search scope bars are inline. In apps built with the iOS 27.0 SDK, a UISearchController using center search-bar placement puts the scope bar on the same row as the search field. If the search field is hosted in a navigation bar, the scope bar sits inline beside it inside the navigation bar.

  • External non-interactive display scenes are no longer offered automatically. In iOS 27.0 apps, the system no longer automatically offers windowExternalDisplayNonInteractive scenes. Register a UISceneAccessory.externalNonInteractive(sceneConfiguration:userInfo:) accessory with UIViewController.registerSceneAccessory(_:) instead.

  • UIMenuLeaf.subtitle is fixed. The release notes say the UIMenuLeaf protocol was missing the subtitle property introduced in iOS 16.0.


Deprecations & removals

No public UIKit classes were removed in iOS 27.


Miscellaneous other changes

Picked up from iOS 26 point releases

These post-date the iOS 26.2 SDK, so they show in the diff but shipped in iOS 26.x updates rather than 27.0:


Methodology: changes were extracted by asking Claude Codex, Opus 4.8, to diff the public ObjC headers and Swift module interface of UIKit.framework (iPhoneOS device SDK, arm64e) between Xcode 26.2 and the Xcode 27 beta. Summary counts: 7 new classes, 0 removed, 2 obsoleted, 23 modified classes, 2 new protocols, 11 new enums.