---
title: "supportedViewingModes(for:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/imagepresentationcomponent/supportedviewingmodes(for:)-7za1y"
---

# supportedViewingModes(for:)

The viewing modes supported by the provided image source.

## Declaration

```swift
static func supportedViewingModes(for imageSource: CGImageSource) -> Set<ImagePresentationComponent.ViewingMode>
```

## Discussion

Discussion note: This method returns the viewing modes that will be supported if you initialize an ImagePresentationComponent with this image source directly via init(imageSource: CGImageSource). The returned set of viewing modes will never include the .spatial3D or .spatial3DImmersive viewing modes, which are only supported when initializing an ImagePresentationComponent with a Spatial3DImage.

## See Also

### Setting and discovering viewing modes

- [ImagePresentationComponent.ViewingMode](realitykit/imagepresentationcomponent/viewingmode-swift.struct.md)
- [viewingMode](realitykit/imagepresentationcomponent/viewingmode-swift.property.md)
- [desiredViewingMode](realitykit/imagepresentationcomponent/desiredviewingmode.md)
- [availableViewingModes](realitykit/imagepresentationcomponent/availableviewingmodes.md)
