Hide view of controller controller while viewing view

I have 3 views in my application. There are 2 buttons in the main window, and when selected, the 2nd view is displayed (which again has buttons and displays the 3rd view with images). I have a button on the second screen. When I click, I want to show the main view. I can do this if I add a second view as a subview

[self.view addSubview: secondViewController.view]

But whenever the second view switches to display the 3rd view, I see the main view when it flips.

Now, if I add a second view, as shown below self.view = secondViewController.view, then I do not have the main view that will be displayed when the home button is pressed.

How to hide the main view when the 2nd view is flipped to display the third view?

+3
source share
1 answer

Perhaps you can simply set the property of the main alpha view to 0 before you flip and 1 after you go back.

I'm not sure what the application looks like, but it looks like you are arbitrarily playing back the many actions provided by navigation apps. Just an offer.

+1
source

Source: https://habr.com/ru/post/1733073/


All Articles