Skip to main content
Version: 5.3

Guest

This template allows you to customize the Guest section of the Preferences page.

import SwiftUI
import mealzcore
import MealziOSSDK

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

Params

public struct PreferencesGuestParameters {
/// The number of guests that the recipes will be optimizing for
@Binding public var guests: Int
/// A closure to update the number of guests
public let onGuestChanged: (Int) -> Void