Contents

MaxDisplayCount

Specifies the maximum number of times a tip displays before the system automatically invalidates it.

Declaration

struct MaxDisplayCount

Overview

Use this option to automatically invalidate a tip after it has appeared a specified number of times.

By default tips have no maximum display count.

struct FavoriteBackyardTip: Tip {
    var options: [any Option] {
        // Tip will only appear 3 times before it is automatically invalidated.
        MaxDisplayCount(3)
    }
}

Topics

Initializers

See Also

Options