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


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.