Skip to main content
Version: 5.4

ProductTitle

Product Title

To create your own title that indicates the current product being replaced with the weight, you create a class that implements BaseTitleProtocol.

import SwiftUI
import MealziOSSDK

@available(iOS 14, *)
public struct MyCustomTitleView: BaseTitleProtocol {
public func content(params: TitleParameters) -> some View {
// your implementation here
}
}

with

public struct TitleParameters {
/// Main text
public let title: String
/// Subtext
public let subtitle: String?