Skip to main content
Version: 4.1

ItemSelectorNoResults

Item Selector No Results

To create your own Item Selector no results template you create a class that implements ItemSelectorNoResultsProtocol

import SwiftUI
import mealzcore
import MealziOSSDK

@available(iOS 14, *)
public struct MyCustomItemSelectorNoResultsView: ItemSelectorNoResultsProtocol {
public func content(params: ItemSelectorNoResultsParameters) -> some View {
// your imp here
}
}

with

public struct ItemSelectorNoResultsParameters {
/// The No Results main text
public let title: String
/// The No Results subtext
public let subtitle: String?
/// If the replaced item does not have substitutes
public let hasNoSubstitutes: Bool
/// Closure to close the Item Selector
public let goBack: () -> Void