Skip to content

Latest commit

 

History

History
677 lines (560 loc) · 36.7 KB

readiness.md

File metadata and controls

677 lines (560 loc) · 36.7 KB

ViewInspector readiness list

This document reflects the current status of the ViewInspector framework: which Views and Modifiers are available for inspection.

Visit this discussion for helping me prioritize the work on a specific APIs.

Denotations

Status Meaning
Full inspection support with access to the underlying values or callbacks
✔️ Not inspectable itself but does not block inspection of the underlying hierarchy
Blocks inspection of the underlying hierarchy
🧑‍💻 Pending development (accepting PRs!)

View Types

Status View Inspectable Attributes
AngularGradient gradient: Gradient, center: UnitPoint, startAngle: Angle, endAngle: Angle
AnyView contained view
Button label view, tap()
ButtonStyleConfiguration.Label
🧑‍💻 CameraView
Color value: Color, rgba: (Float, Float, Float, Float), name: String
ColorPicker label view, select(color: Color)
ConditionalContent contained view
Custom View actualView: CustomView, viewBuilder container
Custom ViewModifier
Custom ViewModifier.Content
UIViewRepresentable uiView: UIView
UIViewControllerRepresentable viewController: UIViewController
DatePicker label view, select(date: Date)
DisclosureGroup label view, content view, isExpanded: Bool, expand(), collapse()
Divider
EditButton editMode: Binding<EditMode>?
EmptyView
EquatableView contained view
Font (*) size: CGFloat, isFixedSize: Bool, name: String, weight: Font.Weight, design: Font.Design, style: Font.TextStyle
ForEach contained view, callOnDelete, callOnMove, callOnInsert
Form contained view
GeometryReader contained view
Group contained view
GroupBox contained view, label view
HSplitView contained view
HStack contained view, alignment: VerticalAlignment, spacing: CGFloat?
Image label view, actualImage: Image
Image (*) rootImage: Image, name: String?, (ui,ns,cg)Image: (UI,NS,CG)Image, orientation: Image.Orientation, scale: CGFloat
Label title view, icon view
LabelStyleConfiguration.Icon
LabelStyleConfiguration.Title
LazyHGrid contained view, alignment: VerticalAlignment, spacing: CGFloat?, pinnedViews: PinnedScrollableViews, rows: [GridItem]
LazyHStack contained view, alignment: VerticalAlignment, spacing: CGFloat?, pinnedViews: PinnedScrollableViews
LazyVGrid contained view, alignment: HorizontalAlignment, spacing: CGFloat?, pinnedViews: PinnedScrollableViews, columns: [GridItem]
LazyVStack contained view, alignment: HorizontalAlignment, spacing: CGFloat?, pinnedViews: PinnedScrollableViews
LinearGradient gradient: Gradient, startPoint: UnitPoint, endPoint: UnitPoint
Link label view, url: URL
List contained view
Map (set)coordinateRegion: MKCoordinateRegion, (set)userTrackingMode: MapUserTrackingMode, (set)mapRect: MKMapRect, interactionModes: MapInteractionModes, showsUserLocation: Bool
MapAnnotation coordinate: CLLocationCoordinate2D, viewType: MapAnnotation.Type, ()anchorPoint: CGPoint, ()tintColor: Color?, (*)contained view
Menu contained view, label view
MenuButton contained view, label view
MenuStyleConfiguration.Content
MenuStyleConfiguration.Label
ModifiedContent contained view
NavigationLink contained view, label view, isActive: Bool, activate(), deactivate()
NavigationView contained view
OptionalContent contained view
OutlineGroup leaf view, source data
PasteButton supportedTypes: [String]
Picker contained view, label view, select(value: Hashable)
Popover content view, attachmentAnchor: PopoverAttachmentAnchor, arrowEdge: Edge, isPresented: Bool, dismiss()
PrimitiveButtonStyleConfiguration.Label
ProgressView label view, currentValueLabel view, fractionCompleted: Double?, progress: Progress
ProgressViewStyleConfiguration.CurrentValueLabel
ProgressViewStyleConfiguration.Label
RadialGradient gradient: Gradient, center: UnitPoint, startRadius: CGFloat, endRadius: CGFloat
🧑‍💻 SceneView
ScrollView contained view, contentInsets: EdgeInsets
ScrollViewReader contained view
Section contained view, header view, footer view
SecureField label view, callOnCommit(), input: String, setInput(_: String)
Shape func path(in rect: CGRect) -> Path, inset: CGFloat, offset: CGSize, scale: (x: CGFloat, y: CGFloat, anchor: UnitPoint), rotation: (angle: Angle, anchor: UnitPoint), transform: CGAffineTransform, size: CGSize, strokeStyle: StrokeStyle, trim: (from: CGFloat, to: CGFloat), fillShapeStyle() -> ShapeStyle, fillStyle: FillStyle
🧑‍💻 SignInWithAppleButton
Slider label view, callOnEditingChanged(), value: Double, setValue(_: Double)
Spacer minLength: CGFloat?
🧑‍💻 SpriteView
Stepper label view, increment(), decrement(), callOnEditingChanged()
✔️ SubscriptionView
TabView contained view
Text string(locale: Locale) -> String, attributes: TextAttributes, images: [Image]
TextEditor input: String, setInput(_: String)
TextField label view, callOnEditingChanged(), callOnCommit(), input: String, setInput(_: String)
Toggle label view, tap(), isOn: Bool
ToggleStyleConfiguration.Label
TouchBar contained view, touchBarID: String
TupleView
VSplitView contained view
VStack contained view, alignment: VerticalAlignment, spacing: CGFloat?
ZStack contained view

(*) The following attributes are available directly for the Font and Image SwiftUI types, as opposed to the attributes available for wrapper views extracted from the hierarchy. In case you obtained an image view from the hierarchy using image() call, you'd need to additionally call actualImage: Image to get the genuine Image structure.

Property Wrappers

Status Modifier
🧑‍💻 @AppStorage
@Binding
@Environment
@EnvironmentObject
🧑‍💻 @FetchRequest
🧑‍💻 @FocusedBinding
🧑‍💻 @FocusedValue
@GestureState
🧑‍💻 @Namespace
@ObservedObject
🧑‍💻 @ScaledMetric
🧑‍💻 @SceneStorage
@State
🧑‍💻 @StateObject
🧑‍💻 @UIApplicationDelegateAdaptor

Gestures

Status Modifier
AnyGesture
DragGesture
ExclusiveGesture
GestureStateGesture
LongPressGesture
MagnificationGesture
RotationGesture
SequenceGesture
SimultaneousGesture
TapGesture

View Modifiers

Sizing a View

Status Modifier
func frame(width: CGFloat?, height: CGFloat?, alignment: Alignment) -> some View
func frame(minWidth: CGFloat?, idealWidth: CGFloat?, maxWidth: CGFloat?, minHeight: CGFloat?, idealHeight: CGFloat?, maxHeight: CGFloat?, alignment: Alignment) -> some View
func fixedSize() -> some View
func fixedSize(horizontal: Bool, vertical: Bool) -> some View
func layoutPriority(Double) -> some View

Positioning a View

Status Modifier
func position(CGPoint) -> some View
func position(x: CGFloat, y: CGFloat) -> some View
func offset(CGSize) -> some View
func offset(x: CGFloat, y: CGFloat) -> some View
func edgesIgnoringSafeArea(Edge.Set) -> some View
func coordinateSpace<T>(name: T) -> some View

Aligning Views

Status Modifier
✔️ func alignmentGuide(HorizontalAlignment, computeValue: (ViewDimensions) -> CGFloat) -> some View
✔️ func alignmentGuide(VerticalAlignment, computeValue: (ViewDimensions) -> CGFloat) -> some View

Adjusting the Padding of a View

Status Modifier
func padding(CGFloat) -> some View
func padding(EdgeInsets) -> some View
func padding(Edge.Set, CGFloat?) -> some View
🧑‍💻 func ignoresSafeArea(SafeAreaRegions, edges: Edge.Set) -> some View

Layering Views

Status Modifier
func overlay<Overlay>(Overlay, alignment: Alignment) -> some View
func background<Background>(Background, alignment: Alignment) -> some View
func zIndex(Double) -> some View

Masking and Clipping Views

Status Modifier
func clipped(antialiased: Bool) -> some View
func clipShape<S>(S, style: FillStyle) -> some View
func cornerRadius(CGFloat, antialiased: Bool) -> some View
func mask<Mask>(Mask) -> some View

Scaling Views

Status Modifier
func scaledToFill() -> some View
func scaledToFit() -> some View
func scaleEffect(CGFloat, anchor: UnitPoint) -> some View
func scaleEffect(CGSize, anchor: UnitPoint) -> some View
func scaleEffect(x: CGFloat, y: CGFloat, anchor: UnitPoint) -> some View
func aspectRatio(CGFloat?, contentMode: ContentMode) -> some View
func aspectRatio(CGSize, contentMode: ContentMode) -> some View
func imageScale(Image.Scale) -> some View

Rotating and Transforming Views

Status Modifier
func rotationEffect(Angle, anchor: UnitPoint) -> some View
func rotation3DEffect(Angle, axis: (x: CGFloat, y: CGFloat, z: CGFloat), anchor: UnitPoint, anchorZ: CGFloat, perspective: CGFloat) -> some View
func projectionEffect(ProjectionTransform) -> some View
func transformEffect(CGAffineTransform) -> some View

Applying Graphical Effects to a View

Status Modifier
func blur(radius: CGFloat, opaque: Bool) -> some View
func opacity(Double) -> some View
func brightness(Double) -> some View
func contrast(Double) -> some View
func colorInvert() -> some View
func colorMultiply(Color) -> some View
func saturation(Double) -> some View
func grayscale(Double) -> some View
func hueRotation(Angle) -> some View
func luminanceToAlpha() -> some View
func shadow(color: Color, radius: CGFloat, x: CGFloat, y: CGFloat) -> some View

Compositing Views

Status Modifier
func blendMode(BlendMode) -> some View
✔️ func compositingGroup() -> some View
✔️ func drawingGroup(opaque: Bool, colorMode: ColorRenderingMode) -> some View

Adding Animations to a View

Status Modifier
✔️ func animation(Animation?) -> some View
✔️ func animation<V>(Animation?, value: V) -> some View
func transition(AnyTransition) -> some View
🧑‍💻 func matchedGeometryEffect<ID>(id: ID, in: Namespace.ID, properties: MatchedGeometryProperties, anchor: UnitPoint, isSource: Bool) -> some View

Text modifiers

Status Modifier
func foregroundColor(_ color: Color?) -> Text
func font(_ font: Font?) -> Text
func fontWeight(_ weight: Font.Weight?) -> Text
func bold() -> Text
func italic() -> Text
func strikethrough(_ active: Bool, color: Color?) -> Text
func underline(_ active: Bool, color: Color?) -> Text
func kerning(_ kerning: CGFloat) -> Text
func tracking(_ tracking: CGFloat) -> Text
func baselineOffset(_ baselineOffset: CGFloat) -> Text

Handling View Taps and Gestures

Status Modifier
func onTapGesture(count: Int, perform: () -> Void) -> some View
func onLongPressGesture(minimumDuration: Double, maximumDistance: CGFloat, pressing: ((Bool) -> Void)?, perform: () -> Void) -> some View
func gesture<T>(T, including: GestureMask) -> some View
func highPriorityGesture<T>(T, including: GestureMask) -> some View
func simultaneousGesture<T>(T, including: GestureMask) -> some View
func transaction((inout Transaction) -> Void) -> some View

Handling Application Life Cycle Events

Status Modifier
🧑‍💻 func userActivity<P>(String, element: P?, (P, NSUserActivity) -> ()) -> some View
🧑‍💻 func userActivity(String, isActive: Bool, (NSUserActivity) -> ()) -> some View
🧑‍💻 func onContinueUserActivity(String, perform: (NSUserActivity) -> ()) -> some View
🧑‍💻 func onOpenURL(perform: (URL) -> ()) -> some View
🧑‍💻 func widgetURL(URL?) -> some View
🧑‍💻 func handlesExternalEvents(preferring: Set<String>, allowing: Set<String>) -> some View

Handling View Events

Status Modifier
func onAppear(perform: (() -> Void)?) -> some View
func onDisappear(perform: (() -> Void)?) -> some View
func onCutCommand(perform: (() -> [NSItemProvider])?) -> some View
func onCopyCommand(perform: (() -> [NSItemProvider])?) -> some View
✔️ func onPasteCommand(of: [String], perform: ([NSItemProvider]) -> Void) -> some View
🧑‍💻 func onPasteCommand(of: [UTType], perform: ([NSItemProvider]) -> Void) -> some View
🧑‍💻 func onPasteCommand<Payload>(of: [UTType], validator: ([NSItemProvider]) -> Payload?, perform: (Payload) -> Void) -> some View
✔️ func onPasteCommand<Payload>(of: [String], validator: ([NSItemProvider]) -> Payload?, perform: (Payload) -> Void) -> some View
func onDeleteCommand(perform: (() -> Void)?) -> some View
func onMoveCommand(perform: ((MoveCommandDirection) -> Void)?) -> some View
func onExitCommand(perform: (() -> Void)?) -> some View
✔️ func onPlayPauseCommand(perform: (() -> Void)?) -> some View
func onCommand(Selector, perform: (() -> Void)?) -> some View
✔️ func deleteDisabled(Bool) -> some View
✔️ func moveDisabled(Bool) -> some View

Handling Publisher Events

Status Modifier
✔️ func onReceive<P>(P, perform: (P.Output) -> Void) -> some View
func onChange<V>(of: V, perform: (V) -> Void) -> some View

Handling Keyboard Shortcuts

Status Modifier
🧑‍💻 func keyboardShortcut(KeyboardShortcut) -> some View
🧑‍💻 func keyboardShortcut(KeyEquivalent, modifiers: EventModifiers) -> some View

Handling View Hover and Focus

Status Modifier
✔️ func onHover(perform: (Bool) -> Void) -> some View
func focusable(Bool, onFocusChange: (Bool) -> Void) -> some View
🧑‍💻 func focusedValue<Value>(WritableKeyPath<FocusedValues, Value?>, Value) -> some View
🧑‍💻 func prefersDefaultFocus(Bool, in: Namespace.ID) -> some View
🧑‍💻 func focusScope(Namespace.ID) -> some View
🧑‍💻 func hoverEffect(HoverEffect) -> some View

Supporting Drag and Drop in Views

Status Modifier
✔️ func onDrag(() -> NSItemProvider) -> some View
🧑‍💻 func onDrop(of: [UTType], delegate: DropDelegate) -> some View
🧑‍💻 func onDrop(of: [UTType], isTargeted: Binding<Bool>?, perform: ([NSItemProvider]) -> Bool) -> some View
🧑‍💻 func onDrop(of: [UTType], isTargeted: Binding<Bool>?, perform: ([NSItemProvider], CGPoint) -> Bool) -> some View
✔️ func onDrop(of: [String], delegate: DropDelegate) -> some View
✔️ func onDrop(of: [String], isTargeted: Binding<Bool>?, perform: ([NSItemProvider], CGPoint) -> Bool) -> some View
✔️ func onDrop(of: [String], isTargeted: Binding<Bool>?, perform: ([NSItemProvider]) -> Bool) -> some View
✔️ func itemProvider(Optional<() -> NSItemProvider?>) -> some View

Configuring a View for Hit Testing

Status Modifier
func allowsHitTesting(Bool) -> some View
func contentShape<S>(S, eoFill: Bool) -> some View

Presenting Action Sheets

Status Modifier
func actionSheet(isPresented: Binding<Bool>, content: () -> ActionSheet) -> some View
func actionSheet<T>(item: Binding<T?>, content: (T) -> ActionSheet) -> some View

Presenting Sheets

Status Modifier
func sheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)?, content: () -> Content) -> some View
func sheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)?, content: (Item) -> Content) -> some View
🧑‍💻 func fullScreenCover<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)?, content: () -> Content) -> some View
🧑‍💻 func fullScreenCover<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)?, content: (Item) -> Content) -> some View

Presenting Alerts

Status Modifier
func alert(isPresented: Binding<Bool>, content: () -> Alert) -> some View
func alert<Item>(item: Binding<Item?>, content: (Item) -> Alert) -> some View

Presenting Popovers

Status Modifier
func popover<Content>(isPresented: Binding<Bool>, attachmentAnchor: PopoverAttachmentAnchor, arrowEdge: Edge, content: () -> Content) -> some View
func popover<Item, Content>(item: Binding<Item?>, attachmentAnchor: PopoverAttachmentAnchor, arrowEdge: Edge, content: (Item) -> Content) -> some View

APIs from other Frameworks

Status Modifier
🧑‍💻 func appStoreOverlay(isPresented: Binding<Bool>, configuration: @escaping () -> SKOverlay.Configuration) -> some View
🧑‍💻 func quickLookPreview<Items>(_ selection: Binding<Items.Element?>, in items: Items) -> some View
🧑‍💻 func quickLookPreview(_ item: Binding<URL?>) -> some View
🧑‍💻 func signInWithAppleButtonStyle(_ style: SignInWithAppleButton.Style) -> some View

Presenting File Management Interfaces

Status Modifier
🧑‍💻 func fileExporter<D>(isPresented: Binding<Bool>, document: D?, contentType: UTType, defaultFilename: String?, onCompletion: (Result<URL, Error>) -> Void) -> some View
🧑‍💻 func fileExporter<D>(isPresented: Binding<Bool>, document: D?, contentType: UTType, defaultFilename: String?, onCompletion: (Result<URL, Error>) -> Void) -> some View
🧑‍💻 func fileExporter<C>(isPresented: Binding<Bool>, documents: C, contentType: UTType, onCompletion: (Result<[URL], Error>) -> Void) -> some View
🧑‍💻 func fileExporter<C>(isPresented: Binding<Bool>, documents: C, contentType: UTType, onCompletion: (Result<[URL], Error>) -> Void) -> some View
🧑‍💻 func fileImporter(isPresented: Binding<Bool>, allowedContentTypes: [UTType], allowsMultipleSelection: Bool, onCompletion: (Result<[URL], Error>) -> Void) -> some View
🧑‍💻 func fileImporter(isPresented: Binding<Bool>, allowedContentTypes: [UTType], onCompletion: (Result<URL, Error>) -> Void) -> some View
🧑‍💻 func fileMover(isPresented: Binding<Bool>, file: URL?, onCompletion: (Result<URL, Error>) -> Void) -> some View
🧑‍💻 func fileMover<C>(isPresented: Binding<Bool>, files: C, onCompletion: (Result<[URL], Error>) -> Void) -> some View

Choosing the Default Storage

Status Modifier
🧑‍💻 func defaultAppStorage(UserDefaults) -> some View

Setting View Preferences

Status Modifier
✔️ func preference<K>(key: K.Type, value: K.Value) -> some View
✔️ func transformPreference<K>(K.Type, (inout K.Value) -> Void) -> some View
✔️ func anchorPreference<A, K>(key: K.Type, value: Anchor<A>.Source, transform: (Anchor<A>) -> K.Value) -> some View
✔️ func transformAnchorPreference<A, K>(key: K.Type, value: Anchor<A>.Source, transform: (inout K.Value, Anchor<A>) -> Void) -> some View

Responding to View Preferences

Status Modifier
✔️ func onPreferenceChange<K>(K.Type, perform: (K.Value) -> Void) -> some View
func backgroundPreferenceValue<Key, T>(Key.Type, (Key.Value) -> T) -> some View
func overlayPreferenceValue<Key, T>(Key.Type, (Key.Value) -> T) -> some View

Setting the Environment Values of a View

Status Modifier
✔️ func environment<V>(WritableKeyPath<EnvironmentValues, V>, V) -> some View
✔️ func environmentObject<B>(B) -> some View
✔️ func transformEnvironment<V>(WritableKeyPath<EnvironmentValues, V>, transform: (inout V) -> Void) -> some View

Setting the Border of a View

Status Modifier
func border<S>(S, width: CGFloat) -> some View

Setting View Colors

Status Modifier
func foregroundColor(Color?) -> some View
func accentColor(Color?) -> some View

Adopting View Color Schemes

Status Modifier
func colorScheme(ColorScheme) -> some View
func preferredColorScheme(ColorScheme?) -> some View

Adjusting Text in a View

Status Modifier
func keyboardType(UIKeyboardType) -> some View
func font(Font?) -> some View
func lineLimit(Int?) -> some View
func lineSpacing(CGFloat) -> some View
func multilineTextAlignment(TextAlignment) -> some View
func minimumScaleFactor(CGFloat) -> some View
func truncationMode(Text.TruncationMode) -> some View
func allowsTightening(Bool) -> some View
func textContentType(UITextContentType?) -> some View
🧑‍💻 func textContentType(NSTextContentType?) -> some View
🧑‍💻 func textContentType(WKTextContentType?) -> some View
🧑‍💻 func textCase(Text.Case?) -> some View
func flipsForRightToLeftLayoutDirection(Bool) -> some View
func autocapitalization(UITextAutocapitalizationType) -> some View
func disableAutocorrection(Bool?) -> some View

Redacting Content

Status Modifier
🧑‍💻 func redacted(reason: RedactionReasons) -> some View
🧑‍💻 func unredacted() -> some View

Configuring Control Attributes

Status Modifier
func labelsHidden() -> some View
func horizontalRadioGroupLayout() -> some View
func controlSize(ControlSize) -> some View

Styling Specific View Types

Status Modifier
func buttonStyle<S>(S) -> some View
func datePickerStyle<S>(S) -> some View
func groupBoxStyle<S>(S) -> some View
func indexViewStyle<S>(S) -> some View
func labelStyle<S>(S) -> some View
func listStyle<S>(S) -> some View
func menuButtonStyle<S>(S) -> some View
func menuStyle<S>(S) -> some View
func navigationViewStyle<S>(S) -> some View
func pickerStyle<S>(S) -> some View
🧑‍💻 func presentedWindowStyle<S>(S) -> some View
🧑‍💻 func presentedWindowToolbarStyle<S>(S) -> some View
func progressViewStyle<S>(S) -> some View
func tabViewStyle<S>(S) -> some View
func textFieldStyle<S>(S) -> some View
func toggleStyle<S>(S) -> some View

Configuring a List View

Status Modifier
func listRowInsets(EdgeInsets?) -> some View
func listRowBackground<V>(V?) -> some View
🧑‍💻 func listRowPlatterColor(Color?) -> some View
🧑‍💻 func listItemTint(ListItemTint?) -> some View
🧑‍💻 func listItemTint(Color?) -> some View
func tag<V>(V) -> some View

Configuring the Navigation Title

Status Modifier
🧑‍💻 func navigationTitle(LocalizedStringKey) -> some View
🧑‍💻 func navigationTitle(Text) -> some View
🧑‍💻 func navigationTitle<S>(S) -> some View
🧑‍💻 func navigationTitle<V>(() -> V) -> some View
🧑‍💻 func navigationSubtitle<S>(S) -> some View
🧑‍💻 func navigationSubtitle(Text) -> some View
🧑‍💻 func navigationSubtitle(LocalizedStringKey) -> some View

Configuring Navigation and Status Bar Views

Status Modifier
✔️ func navigationBarTitle(Text) -> some View
✔️ func navigationBarTitle(Text, displayMode: NavigationBarItem.TitleDisplayMode) -> some View
✔️ func navigationBarTitle(LocalizedStringKey) -> some View
✔️ func navigationBarTitle<S>(S) -> some View
✔️ func navigationBarTitle(LocalizedStringKey, displayMode: NavigationBarItem.TitleDisplayMode) -> some View
🧑‍💻 func navigationBarTitleDisplayMode(NavigationBarItem.TitleDisplayMode) -> some View
✔️ func navigationBarHidden(Bool) -> some View
✔️ func statusBar(hidden: Bool) -> some View

Configuring Navigation and Tab Bar Item Views

Status Modifier
✔️ func navigationBarBackButtonHidden(Bool) -> some View
✔️ func navigationBarItems<L>(leading: L) -> some View
✔️ func navigationBarItems<L, T>(leading: L, trailing: T) -> some View
✔️ func navigationBarItems<T>(trailing: T) -> some View
func tabItem<V>(() -> V) -> some View

Configuring Toolbar Items

Status Modifier
🧑‍💻 func toolbar<Content>(content: () -> Content) -> some View
🧑‍💻 func toolbar<Content>(content: () -> Content) -> some View
🧑‍💻 func toolbar<Content>(id: String, content: () -> Content) -> some View

Configuring Context Menu Views

Status Modifier
✔️ func contextMenu<MenuItems>(ContextMenu<MenuItems>?) -> some View
✔️ func contextMenu<MenuItems>(menuItems: () -> MenuItems) -> some View

Configuring Touch Bar Views

Status Modifier
func touchBar<Content>(content: () -> Content) -> some View
func touchBar<Content>(TouchBar<Content>) -> some View
func touchBarItemPrincipal(Bool) -> some View
func touchBarCustomizationLabel(Text) -> some View
func touchBarItemPresence(TouchBarItemPresence) -> some View

Hiding and Disabling Views

Status Modifier
func hidden() -> some View
func disabled(Bool) -> some View

Customizing Accessibility Labels of a View

Status Modifier
🧑‍💻 func accessibilityLabel<S>(S) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityLabel(Text) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityLabel(LocalizedStringKey) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityValue<S>(S) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityValue(LocalizedStringKey) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityValue(Text) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityHidden(Bool) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityIdentifier(String) -> ModifiedContent<Self, AccessibilityAttachmentModifier>

Customizing Accessibility Interactions of a View

Status Modifier
🧑‍💻 func accessibilityHint(LocalizedStringKey) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityHint(Text) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityHint<S>(S) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityActivationPoint(CGPoint) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityActivationPoint(UnitPoint) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
func accessibilityAction(AccessibilityActionKind, () -> Void) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
✔️ func accessibilityAction(named: Text, () -> Void) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityAction<S>(named: S, () -> Void) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityAction(named: LocalizedStringKey, () -> Void) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
func accessibilityAdjustableAction((AccessibilityAdjustmentDirection) -> Void) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
func accessibilityScrollAction((Edge) -> Void) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityIgnoresInvertColors(Bool) -> some View
🧑‍💻 func accessibilityLabeledPair<ID>(role: AccessibilityLabeledPairRole, id: ID, in: Namespace.ID) -> some View

Customizing Accessibility Navigation of a View

Status Modifier
✔️ func accessibilityElement(children: AccessibilityChildBehavior) -> some View
🧑‍💻 func accessibilityInputLabels([LocalizedStringKey]) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityInputLabels<S>([S]) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityInputLabels([Text]) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityAddTraits(AccessibilityTraits) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityRemoveTraits(AccessibilityTraits) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilitySortPriority(Double) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibilityLinkedGroup<ID>(id: ID, in: Namespace.ID) -> some View

Customizing the Help Text of a View

Status Modifier
🧑‍💻 func help(LocalizedStringKey) -> some View
🧑‍💻 func help<S>(S) -> some View
🧑‍💻 func help(Text) -> some View

Deprecated Accessibility Modifiers

Status Modifier
func accessibility(label: Text) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
func accessibility(value: Text) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
func accessibility(hidden: Bool) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
func accessibility(identifier: String) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
func accessibility(selectionIdentifier: AnyHashable) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
func accessibility(hint: Text) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
func accessibility(activationPoint: UnitPoint) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
func accessibility(activationPoint: CGPoint) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
🧑‍💻 func accessibility(inputLabels: [Text]) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
✔️ func accessibility(addTraits: AccessibilityTraits) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
✔️ func accessibility(removeTraits: AccessibilityTraits) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
func accessibility(sortPriority: Double) -> ModifiedContent<Self, AccessibilityAttachmentModifier>

Configuring View Previews

Status Modifier
func previewDevice(PreviewDevice?) -> some View
func previewDisplayName(String?) -> some View
func previewLayout(PreviewLayout) -> some View
🧑‍💻 func previewContext<C>(C) -> some View

Inspecting Views

Status Modifier
func id<ID>(ID) -> some View
func equatable() -> EquatableView<Self>

Implementing View Modifiers

Status Modifier
func modifier<T>(T) -> ModifiedContent<Self, T>