Skip to main content
Version: 5.5

RecipeDetailSteps

Steps

To create your own recipe detail steps template you create a class that implements RecipeDetailsStepsProtocol

import SwiftUI
import mealzcore
import MealziOSSDK

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

with

public struct RecipeDetailsStepsParameters {
/// The active cooking step the user is on. For example, the first step is usually "Cut the vegetables."
public let activeStep: Binding<Int>
/// Each of the steps to display that the user can interact with. For example, a step could be "Add a pinch of salt."
public let steps: [RecipeStep]