1
votes

I have a view controller which is connected my tab bar controller. This view controller also has a segue connection to a pop up view controller. As shown in the image below.

enter image description here

The problem is having is that the tab bar is being placed at the front of my pop up view controller like below.

enter image description here

I don't want this to be clickable since some weird behaviour happens when you press an item on the tab bar. So is there a way to send this to the back or hide this tab bar controller?

It's worth noting that in the class for this view controller there isn't an IBOutlet for this tab bar controller so i'm not able to access it in this view.

1

1 Answers

2
votes

Removing a tab bar controller from a view controller where a pop-up or alert is only partially covering the background (or parent) view controller could be confusing or wierd looking to the user.

If you have access to your tab bar controller via an IBOutlet, you could disable touches to it by setting .userInteractionEnabled to false and setting the alpha of it to 0.7 or 0.6, giving an impression that it's temporarily disabled while the pop up is appearing.

If you don't have access to your tab bar controller (I just noticed that comment in the last sentences of your question), you could also register a notification observer in the class that does hold the tab bar controller outlet and you can send custom events (that you define) like "popupViewAppeared" and "popupViewDisappeared" to enable/disable the tab bar controller.