0

I have a Container viewController with 3 Child viewControllers.

When the app first launches all 3 Child viewControllers gets loaded instead of me first swiping to the View controller. This is causing me issues when my analytics tool tracks what screen the user is on/loaded. How can I prevent this form happening?

user7097242
  • 1,034
  • 3
  • 16
  • 31
  • You need to show us some code! How would you be able to help someone with this question like you have done? –  Jul 08 '17 at 03:07
  • are you playing with alpha values of view controller, while adding / removing child view controller?? – luckyShubhra Jul 08 '17 at 04:19

1 Answers1

1

You should embed your initial child view controller in your container view, instead of loading all Child View Controller. Its better to add/ remove child view controller when required, instead of loading all child view controller at initial stage.

Hold the Ctrl key and drag with the mouse from the container view to the child view controller. Now add an embed segue.

Instead of playing with alpha values of all child view controller its advisable to add / remove required view controller in container view. You can consult this link for more info.This links explains healthy ways to employ container view.

Hope it helps. Happy Coding!!

luckyShubhra
  • 2,731
  • 1
  • 12
  • 19