- Added a delegate method for determining when a tab will be shown.