Adding tips rules
Throughout this chapter, we have focused mainly on the UI side of displaying tips so far. However, we already know that tips are more than just nice views – they must correspond to some app logic or states. For example, maybe there are tips that we present when the user is logged in. In a photo app, we can show a tip suggesting adding an album after the user takes a certain number of photos.
Tips must often be made aware of users’ flows and states. That’s why TipKit also contains a feature called rules.
There are two rule types:
- Based on state: Show or hide the tip based on a specific state. The user logged in, performed a particular action, and more.
- Events tracking: Show or hide the tip based on the number of events the user performed. For example, if the user entered a specific screen in the settings a few times in the past week, we could offer for them to create a shortcut for that screen.
Let’s start with...