Skip to main content
Version: 5.3

View Options Available

Each page & template is fully customizable to your brand's design. All View Options are optional, there are Mealz defaults for each view.

info

To understand how to create a custom component, you can read here.

We recommend putting all of your custom ViewOptions into a custom class. In our sample implementations, we have one class MealzViewConfig, however you may find it more maintainable to have multiple classes.

import MealziOSSDK

struct MealzViewConfig {
// the below View Options go here
}

Base Views

View Options

Base Views - BasePageViewParameters

import MealziOSSDK

static let baseViews = BasePageViewParameters(
loading: TypeSafeLoading(/* your new view*/),
empty: TypeSafeEmpty(/* your new view*/),
background: TypeSafeBackground(/* your new view*/)
)

Components:

Item Selector Options

View Options

Item Selector - ItemSelectorViewOptions

import MealziOSSDK

static let itemSelectorViewOptions = ItemSelectorViewOptions(
searchBar = TypeSafeSearch(/* your new view*/),
title = TypeSafeBaseTitle(/* your new view*/),
selectedProduct = TypeSafeItemSelectorSelectedProduct(/* your new view*/),
productOptions = TypeSafeItemSelectorOptionProducts(/* your new view*/),
noResults = TypeSafeItemSelectorNoResults(/* your new view*/)
)

Protocols: