<!--
{
  "documentType" : "article",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View-Deprecated",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Deprecated modifiers"
}
-->

# Deprecated modifiers

Review unsupported modifiers and their replacements.

## Overview

Avoid using deprecated modifiers in your app. Select a
modifier to see the replacement that you should use instead.

## Topics

### Accessibility modifiers

[`accessibility(label:)`](/documentation/SwiftUI/View/accessibility(label:))

Adds a label to the view that describes its contents.

[`accessibility(value:)`](/documentation/SwiftUI/View/accessibility(value:))

Adds a textual description of the value that the view contains.

[`accessibility(hidden:)`](/documentation/SwiftUI/View/accessibility(hidden:))

Specifies whether to hide this view from system accessibility features.

[`accessibility(identifier:)`](/documentation/SwiftUI/View/accessibility(identifier:))

Uses the specified string to identify the view.

[`accessibility(selectionIdentifier:)`](/documentation/SwiftUI/View/accessibility(selectionIdentifier:))

Sets a selection identifier for this view’s accessibility element.

[`accessibility(hint:)`](/documentation/SwiftUI/View/accessibility(hint:))

Communicates to the user what happens after performing the view’s action.

[`func   accessibility ( activationPoint :)`](/documentation/SwiftUI/View/accessibility(activationPoint:))

Specifies the point where activations occur in the view.

[`accessibility(inputLabels:)`](/documentation/SwiftUI/View/accessibility(inputLabels:))

Sets alternate input labels with which users identify a view.

[`accessibility(addTraits:)`](/documentation/SwiftUI/View/accessibility(addTraits:))

Adds the given traits to the view.

[`accessibility(removeTraits:)`](/documentation/SwiftUI/View/accessibility(removeTraits:))

Removes the given traits from this view.

[`accessibility(sortPriority:)`](/documentation/SwiftUI/View/accessibility(sortPriority:))

Sets the sort priority order for this view’s accessibility element,
relative to other elements at the same level.

### Appearance modifiers

[`colorScheme(_:)`](/documentation/SwiftUI/View/colorScheme(_:))

Sets this view’s color scheme.

[`listRowPlatterColor(_:)`](/documentation/SwiftUI/View/listRowPlatterColor(_:))

Sets the color that the system applies to the row background when this
view is placed in a list.

[`background(_:alignment:)`](/documentation/SwiftUI/View/background(_:alignment:))

Layers the given view behind this view.

[`overlay(_:alignment:)`](/documentation/SwiftUI/View/overlay(_:alignment:))

Layers a secondary view in front of this view.

[`foregroundColor(_:)`](/documentation/SwiftUI/View/foregroundColor(_:))

Sets the color of the foreground elements displayed by this view.

[`complicationForeground()`](/documentation/SwiftUI/View/complicationForeground())

Promotes this view to the foreground in a complication.

### Text modifiers

[`autocapitalization(_:)`](/documentation/SwiftUI/View/autocapitalization(_:))

Sets whether to apply auto-capitalization to this view.

[`disableAutocorrection(_:)`](/documentation/SwiftUI/View/disableAutocorrection(_:))

Sets whether to disable autocorrection for this view.

### Auxiliary view modifiers

[`func   navigationBarTitle ( _ :)`](/documentation/SwiftUI/View/navigationBarTitle(_:))

Sets the title in the navigation bar for this view.

[`func   navigationBarTitle ( _ : displayMode :)`](/documentation/SwiftUI/View/navigationBarTitle(_:displayMode:))

Sets the title and display mode in the navigation bar for this view.

[`navigationBarItems(leading:)`](/documentation/SwiftUI/View/navigationBarItems(leading:))

Sets the navigation bar items for this view.

[`navigationBarItems(leading:trailing:)`](/documentation/SwiftUI/View/navigationBarItems(leading:trailing:))

Sets the navigation bar items for this view.

[`navigationBarItems(trailing:)`](/documentation/SwiftUI/View/navigationBarItems(trailing:))

Configures the navigation bar items for this view.

[`navigationBarHidden(_:)`](/documentation/SwiftUI/View/navigationBarHidden(_:))

Hides the navigation bar for this view.

[`statusBar(hidden:)`](/documentation/SwiftUI/View/statusBar(hidden:))

Sets the visibility of the status bar.

[`contextMenu(_:)`](/documentation/SwiftUI/View/contextMenu(_:))

Adds a context menu to the view.

### Style modifiers

[`menuButtonStyle(_:)`](/documentation/SwiftUI/View/menuButtonStyle(_:))

Sets the style for menu buttons within this view.

[`navigationViewStyle(_:)`](/documentation/SwiftUI/View/navigationViewStyle(_:))

Sets the style for navigation views within this view.

### Layout modifiers

[`frame()`](/documentation/SwiftUI/View/frame())

Positions this view within an invisible frame.

[`edgesIgnoringSafeArea(_:)`](/documentation/SwiftUI/View/edgesIgnoringSafeArea(_:))

Changes the view’s proposed area to extend outside the screen’s safe
areas.

[`coordinateSpace(name:)`](/documentation/SwiftUI/View/coordinateSpace(name:))

Assigns a name to the view’s coordinate space, so other code can operate
on dimensions like points and sizes relative to the named space.

### Graphics and rendering modifiers

[`accentColor(_:)`](/documentation/SwiftUI/View/accentColor(_:))

Sets the accent color for this view and the views it contains.

[`mask(_:)`](/documentation/SwiftUI/View/mask(_:))

Masks this view using the alpha channel of the given view.

[`animation(_:)`](/documentation/SwiftUI/View/animation(_:)-1hc0p)

Applies the given animation to all animatable values within this view.

[`cornerRadius(_:antialiased:)`](/documentation/SwiftUI/View/cornerRadius(_:antialiased:))

Clips this view to its bounding frame, with the specified corner radius.

### Input and events modifiers

[`dropDestination(for:action:isTargeted:)`](/documentation/SwiftUI/View/dropDestination(for:action:isTargeted:))

Defines the destination of a drag and drop operation that handles the
dropped content with a closure that you specify.

[`onChange(of:perform:)`](/documentation/SwiftUI/View/onChange(of:perform:))

Adds an action to perform when the given value changes.

[`onTapGesture(count:coordinateSpace:perform:)`](/documentation/SwiftUI/View/onTapGesture(count:coordinateSpace:perform:)-36x9h)

Adds an action to perform when this view recognizes a tap gesture,
and provides the action with the location of the interaction.

[`onLongPressGesture(minimumDuration:maximumDistance:pressing:perform:)`](/documentation/SwiftUI/View/onLongPressGesture(minimumDuration:maximumDistance:pressing:perform:))

Adds an action to perform when this view recognizes a long press
gesture.

[`onLongPressGesture(minimumDuration:pressing:perform:)`](/documentation/SwiftUI/View/onLongPressGesture(minimumDuration:pressing:perform:))

Adds an action to perform when this view recognizes a long press
gesture.

[`onPasteCommand(of:perform:)`](/documentation/SwiftUI/View/onPasteCommand(of:perform:)-4f78f)

Adds an action to perform in response to the system’s
Paste command.

[`onPasteCommand(of:validator:perform:)`](/documentation/SwiftUI/View/onPasteCommand(of:validator:perform:)-964k1)

Adds an action to perform in response to the system’s
Paste command with items that you validate.

[`onDrop(of:delegate:)`](/documentation/SwiftUI/View/onDrop(of:delegate:)-2vr9o)

Defines the destination for a drag and drop operation with the same size
and position as this view, with behavior controlled by the given
delegate.

[`func   onDrop ( of : isTargeted : perform :)`](/documentation/SwiftUI/View/onDrop(of:isTargeted:perform:))

Defines the destination of a drag-and-drop operation that handles the
dropped content with a closure that you specify.

[`focusable(_:onFocusChange:)`](/documentation/SwiftUI/View/focusable(_:onFocusChange:))

Specifies if the view is focusable and, if so, adds an action to perform
when the view comes into focus.

[`onContinuousHover(coordinateSpace:perform:)`](/documentation/SwiftUI/View/onContinuousHover(coordinateSpace:perform:)-8gyrl)

Adds an action to perform when the pointer enters, moves within, and
exits the view’s bounds.

### View presentation modifiers

[`actionSheet(isPresented:content:)`](/documentation/SwiftUI/View/actionSheet(isPresented:content:))

Presents an action sheet when a given condition is true.

[`actionSheet(item:content:)`](/documentation/SwiftUI/View/actionSheet(item:content:))

Presents an action sheet using the given item as a data source for the
sheet’s content.

[`alert(isPresented:content:)`](/documentation/SwiftUI/View/alert(isPresented:content:))

Presents an alert to the user.

[`alert(item:content:)`](/documentation/SwiftUI/View/alert(item:content:))

Presents an alert to the user.

### Search modifiers

[`func   searchable ( text : placement : prompt : suggestions :)`](/documentation/SwiftUI/View/searchable(text:placement:prompt:suggestions:))

Marks this view as searchable, which configures the display of a
search field.

### Tab modifiers

[`tabItem(_:)`](/documentation/SwiftUI/View/tabItem(_:))

Sets the tab bar item associated with this view.

### Generating image modifiers

[`imagePlaygroundPersonalizationPolicy(_:)`](/documentation/SwiftUI/View/imagePlaygroundPersonalizationPolicy(_:))

Policy determining whether to support the usage of people in the playground or not.

### Technology-specific modifiers

[`func   postToPhotosSharedAlbumSheet ( isPresented : items : photoLibrary : defaultAlbumIdentifier : completion :)`](/documentation/SwiftUI/View/postToPhotosSharedAlbumSheet(isPresented:items:photoLibrary:defaultAlbumIdentifier:completion:))

Presents an “Add to Shared Album” sheet that allows the user to post the given items to a shared album.

[`offerCodeRedemption(isPresented:onCompletion:)`](/documentation/SwiftUI/View/offerCodeRedemption(isPresented:onCompletion:))

[`subscriptionPromotionalOffer(offer:signature:)`](/documentation/SwiftUI/View/subscriptionPromotionalOffer(offer:signature:))

Selects a promotional offer to apply to a purchase a customer makes from a subscription store view.



---

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)