italic
Makes text italic. When applied to Text, it works on all iOS/tvOS versions. When used on regular views, it requires iOS 16.0+/tvOS 16.0+.
italic()
Makes text italic. When applied to Text, it works on all iOS/tvOS versions. When used on regular views, it requires iOS 16.0+/tvOS 16.0+.
Returns: ModifierConfig
See: Official SwiftUI documentation.
Works with
You can add italic to any view. It changes what you see on 34 of the 39 components.
- VStack
- HStack
- ZStack
- LazyVStack
- LazyHStack
- Group
- Overlay
- ScrollView
- Button
- Toggle
- Checkbox
- Picker
- DatePicker
- ColorPicker
- Link
- ControlGroup
- Menu
- ContextMenu
- TextField
- SecureField
- Text
- Label
- List
- Form
- Section
- DisclosureGroup
- SwipeActions
- BottomSheet
- Alert
- ConfirmationDialog
- Popover
- ProgressView
- Gauge
- TabView
No visible effect
These components accept it, but you see no change.
| Component | Why nothing happens |
|---|---|
| Spacer | It changes only text, and Spacer shows no text. |
| Divider | It changes only text, and Divider shows no text. |
| Slider | It changes only text, and Slider shows no text. |
| Image | It changes only text, and Image shows no text. |
| AccessoryWidgetBackground | It changes only text, and AccessoryWidgetBackground shows no text. |
Sources
The original Expo docs for this page:
- italic (Modifiers) (
source-of-truth/versions/v57.0.0/sdk/ui/swift-ui/modifiers.md)
invalidatableContent
Marks the view's content as invalidatable. It is restyled with the "pending update" appearance only when the invalidated redaction reason is applied to an ancestor (for example redacted('invalidated')). Maps to SwiftUI's invalidatableContent(_:).
kerning
Sets the spacing, or kerning, between characters for the text in this view.