<!--
{
  "documentType" : "article",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/multitasking-on-ipad-mac-and-apple-vision-pro",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Multitasking on iPad, Mac, and Apple Vision Pro"
}
-->

# Multitasking on iPad, Mac, and Apple Vision Pro

Implement multitasking APIs to seamlessly integrate your app with iPadOS, macOS, and visionOS.

## Discussion

While your app’s scene runs in the foreground on iPad, Mac, or Apple Vision Pro, other apps are likely to be running alongside it. Being aware of the environment your app may be running in and adopting the multitasking APIs are an essential part of integrating your apps with iPadOS, macOS, and visionOS.

### Adapting to different window sizes

The first step in creating a great multitasking experience for people is to ensure your app’s scenes can adapt to different window sizes. Start by reading [Layout](https://developer.apple.com/design/human-interface-guidelines/layout) in the [Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines/).

Consider that your app may be running in a smaller window rather than full screen. Discover your app’s environment with [`UITraitCollection`](/documentation/UIKit/UITraitCollection) and adapt to it by using Auto Layout or [Automatic trait tracking](/documentation/UIKit/automatic-trait-tracking). Or, register to observe specific trait changes on your view or view controller with [`UITraitChangeObservable`](/documentation/UIKit/UITraitChangeObservable-67e94) methods. Since people can resize your app’s window, set a minimum size for your window with [`UISceneSizeRestrictions`](/documentation/UIKit/UISceneSizeRestrictions).

To observe a scene’s geometry changing, use [`windowScene(_:didUpdateEffectiveGeometry:)`](/documentation/UIKit/UIWindowSceneDelegate/windowScene(_:didUpdateEffectiveGeometry:)) and compare the `coordinateSpace.bounds` of both geometries. Check [`isInteractivelyResizing`](/documentation/UIKit/UIWindowScene/Geometry/isInteractivelyResizing) to determine if a person is currently resizing the scene, and adjust what assets you update during resizing to improve performance.

### Supporting multiple scenes

You can choose to allow multiple scenes in your app’s UI to run concurrently by setting the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/UIApplicationSceneManifest/UIApplicationSupportsMultipleScenes> property list key. Implement [Scenes](/documentation/UIKit/scenes) and read [Managing your app’s life cycle](/documentation/UIKit/managing-your-app-s-life-cycle) for an overview of how [`UISceneDelegate`](/documentation/UIKit/UISceneDelegate) interacts with the system multitasking events.
For information on adopting the scene-based life cycle, see <doc://com.apple.documentation/documentation/Technotes/tn3187-Migrating-to-the-UIKit-scene-based-life-cycle>.

### Supporting different interface orientations

Design your app’s scenes to display correctly in any interface orientation. In situations where you want to lock the app’s interface to its current orientation, call [`setNeedsUpdateOfPrefersInterfaceOrientationLocked()`](/documentation/UIKit/UIViewController/setNeedsUpdateOfPrefersInterfaceOrientationLocked()), then return <doc://com.apple.documentation/documentation/Swift/true> as the value of [`prefersInterfaceOrientationLocked`](/documentation/UIKit/UIViewController/prefersInterfaceOrientationLocked), or override [`childForInterfaceOrientationLock`](/documentation/UIKit/UIViewController/childForInterfaceOrientationLock) to delegate the decision to a child view controller.
Implement [`windowScene(_:didUpdateEffectiveGeometry:)`](/documentation/UIKit/UIWindowSceneDelegate/windowScene(_:didUpdateEffectiveGeometry:)) to observe orientation changes, as the system might change the interface orientation even if you signal a preference to lock it.
The preference to lock the interface orientation lasts until your app stops presenting the scene, or you call `setNeedsUpdateOfPrefersInterfaceOrientationLocked()` again and return <doc://com.apple.documentation/documentation/Swift/false> as the value of `prefersInterfaceOrientationLocked`.

## Topics

### Adaptivity

[`UITraitCollection`](/documentation/UIKit/UITraitCollection)

A collection of data that represents the environment for an individual element in your app’s user interface.

[`UITraitEnvironment`](/documentation/UIKit/UITraitEnvironment)

A set of methods that makes the iOS interface environment available to your app.

[Automatic trait tracking](/documentation/UIKit/automatic-trait-tracking)

Reduce the need to manually register for trait changes when you use traits within a method or closure that supports automatic trait tracking.

[`UIAdaptivePresentationControllerDelegate`](/documentation/UIKit/UIAdaptivePresentationControllerDelegate)

A set of methods that, in conjunction with a presentation controller, determine how to respond to trait changes in your app.

[`UIContentContainer`](/documentation/UIKit/UIContentContainer)

A set of methods for adapting the contents of your view controllers to size and trait changes.

### Scene Management

[Scenes](/documentation/UIKit/scenes)

Manage multiple instances of your app’s UI simultaneously, and direct resources to the appropriate instance of your UI.

[Supporting multiple windows on iPad](/documentation/UIKit/supporting-multiple-windows-on-ipad)

Support side-by-side instances of your app’s interface and create new windows.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)