iPhone SwiftUI layouts

Explore SwiftUI APIs, components, and modifiers with interactive iPhone previews, Swift code, and Apple documentation. Compare every available orientation, appearance, and design.

View

Music Picker

Presents a music picker to select items from the Apple Music catalog and the user’s music library.

Explore Music Picker on iPhone in portrait, with SwiftUI code and Apple API documentation.

import MusicKit

@State var showMusicPicker = true
@State var selectedSongs: MusicItemCollection<Song> = []

var body: some View {
    Text("Foo")
        .musicPicker(
            isPresented: $showMusicPicker,
            title: Text("Bar"),
            selection: $selectedSongs
        )
    }
iOS 27.0+ iPadOS 27.0+ visionOS 27.0+

Every available iPhone screenshot for Music Picker.

1 views