Presenters:
- Sam Lazarus, SwiftUI Engineer
- Sommer Panage, SwiftUI Engineer
Link: https://developer.apple.com/wwdc24/10144
- New tab view
- Mesh gradient
- Snap view controls
- More flexible sidebar in iOS 18
- Tab bar floats above the content
- People can reorder and customize options
- New TabView/Tab type-safe syntax
.tabViewStyle()
.tabViewCustomization()
- Appear as a sidebar or presentation control
- New zoom navigation style
Check out
- Improve your tab and sidebar experience on iPad
- Enhance your UI animations and transitions
- New kind of widget you can build with App Intents
ControlWidgetButton
Check out
- Access your app's controls across the system
- Function plotting
- Vecrtorized plots
Check out: Swift Charts: Vectorized and function plots
- Table column for each
- Composing mesh gradients:
MeshGradient
- New document launcher
Check out: Evolve your document launch experience
- New symbol effects
- wiggle
- breathe
- rotate
- replace
Check out: What's new in SF Symbols
- Improved windowing
- Input methods
- Window
- windowStyle()
- windowLevel
- defaultWindowPlacement
- WindowDragGesture
Check out: Tailor macoOS windows with SwiftUI
- Push window: open a window and hide the originating window pushWindow() environment action
Check out: Work with windows in SwiftUI
- In visionOS, react to
- hoverEffect - customize how the view looks
Check out: Create custom hover effects in visionOS
- modifierKeyAlternate
- onModifierKeysChanged
- pointerStyle API to customize
- onPencilSqueeze
Check out: Squeeze the most out of Apple Pencil
- supplementalActivityFamilies
- Double tap modifier
- Additional date format styles
- Widget relevance
- For each (subviewOf)
- Make custom containers with same capabilities as SwiftUI
- Support sections, add container-specific modifiers
Check out: Demystify SwiftUI Containers
- Entry macro - extension on EnvironmentValues, FocusValues, Transaction, and new container
- Default accessibility label augmentation
Check out: Catch up on accessibility in SwiftUI
- Use state directly in previews with
@Previewable
macro - Programmatic access to text selection
- Check if a search field is focused, programmatically move focus
- Add text suggestions to any text box
- New graphics capabilities (combine colors)
- Precompile shaders before first use
- React to scroll geometry changes
- React to content moving on or off screen
- More scroll positions to programmatically scroll to
- SwiftUI view protocol now marked with MainActor
- All types conforming to View now conform to MainActor by default
- Can remove MainActor annotation
Check out: Migrate your app to Swift 6
- Gesture interoperability
- APIs for bridging animation
Check out: Enhance your UI animations and transitions
Check out: Dive deep into volumes and immersive spaces
- Custom text renderers
Check out: Create custom visual effects with SwiftUI