Contents

UIUserInterfaceIdiom.vision

An interface designed for visionOS and Apple Vision Pro.

Declaration

case vision

Discussion

If your app has existing code that runs in the UIUserInterfaceIdiom.pad idiom, you might want to reuse the same code in the UIUserInterfaceIdiom.vision idiom. The following code shows how to check for these idioms:

if idiom == .pad || idiom == .vision {
   // Code to run in the iPad or Apple Vision Pro idioms.
} else { 
   // Code to run in other idioms.
}

See Also

Idioms