Tab bar button question

I have a Tab Bar Controller app with five tab bar items and it works fine displaying the corresponding view for each tab. I have used the Interface Builder to develop the UI thus far.

I want to detect (when a given view is being displayed) that the same tab bar
button is pressed. Is there an event that I can use to be notified of this -- all
I want to do is to set flag indicating that the button was pressed while the view is already active.

Original thread: https://forums.imore.com/threads/tab-bar-button-question.205590/