Skip to main content
Version: 5.5

RecipeDetailsFloatingNavigation

RecipeDetailsFloatingNavigation

The FloatingNavigation is the first customizable component on the RecipeDetail at the very top of the page. It contains the "go back" button, like button, & title; to create your own recipe detail header you create a class that implements RecipeDetailsFloatingNavigationProtocol

import SwiftUI
import mealzcore
import MealziOSSDK

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

with

public struct RecipeDetailsFloatingNavigationParameters {
/// The recipe title
public let title: String?
/// The ID of recipe
public let recipeId: String
/// If the retailer allows the Mealz Like feature
public let isLikeEnabled: Bool
/// If the user has scrolled past the Recipe Title on the page, it should appear at the top of the page
public let displayRecipeTitle: Bool
/// Closure to close Page
public let onRecipeDetailsClosed: () -> Void