Contents

displayFrequency(_:)

Customizes how often new tips are presented in your app after another tip has been displayed.

Declaration

static func displayFrequency(_ displayFrequency: Tips.ConfigurationOption.DisplayFrequency) -> Tips.ConfigurationOption

Overview

Use displayFrequency to control how often new tips are displayed. For example, if display frequency is set to .daily and your FavoriteLandmarkTip is displayed, no new tips will be shown for at least 24 hours.

Display frequency only applies to tips that have not appeared. Previously displayed tips will still appear if their display rules are satisfied.

Individual tips can override this behavior by specifying IgnoresDisplayFrequency in their options.

The default value for this option is immediate.

Display frequency can be set using configure(_:):

@main
struct SampleApp: App {
    init() {
        do {
            // Configure your tips with a daily display frequency.
            try Tips.configure([
                .displayFrequency(.daily)
            ])
        }
        catch {
            // Handle TipKit errors
            print("Error initializing TipKit \(error.localizedDescription)")
        }
    }
}

Display Frequency Values

See Also

Configuration