Is there a way, such as a delegate, for the tab bar controller to do something when you tap an item?
The action should only be performed once when the view is displayed and not if you repeatedly press on the tab button.
I am using this delegate, but it does not work well since every time I touch on the tab it starts (instead of starting only at each tab change)
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
print("Hey")
}