Post

Replies

Boosts

Views

Activity

Musickit Top Results only return 3 items
I've been trying to implement MusicCatalogSearchRequest with includeTopResults. It works. But topResults only returns 3 items. I tried with many different search terms and even compared the same search term with Apple Music app where it gives many more top results. Below is my code var searchRequest = MusicCatalogSearchRequest(term: searchTerm,                             types: [                              Song.self,                              MusicVideo.self,                              Album.self,                              Playlist.self,                              Curator.self,                              RadioShow.self,                              Artist.self                             ])      searchRequest.includeTopResults = true      searchResponse = try await searchRequest.response()      print(searchResponse?.topResults) What should I do to get more relevant top results? Could this be a bug in iOS 16 Beta or is topResults restricted to 3 items in Musickit?
2
1
1.9k
Sep ’22
SwiftUI animation glitch with search bar and Scroll view (iOS 16.4 / SwiftUI 4)
Animation is glitching when I tap on search bar Below is the code struct CustomTabBar: View { @State var searchText = "" var data = [1,2,3,4,5,6,7,8,9,10] var body: some View { NavigationStack { ScrollView(.vertical) { ForEach(data, id: \.self) { d in box } } .navigationTitle("Search") .searchable(text: $searchText) } } var box: some View { Rectangle() .frame(width: 75, height: 50) .cornerRadius(10) } }
6
0
1.2k
May ’23