0

I use two containerViews one over another to load inside the same tabBar parent Page. If condition A is true set containerA alpha to 1 and container B alpha to 0 If condition B is true set set containerA alpha to 0 and container B alpha to 1

I am loading a JSON from the server in my viewdidload/viewwillappear of corresponding childViewControllers which is attached to parent UIViewContainer. My issue is that whenever I opens the tab, it loads both's childViewcontroller(containerA and containerB) Viewload method . So it calls both's containers JSON request to server. Is there a good way to separate this JSON calls ?

Vinod
  • 675
  • 3
  • 7
  • 25
  • I use UIViewControllers, normally where should we do it? I am newbie in swift/iOS. – Vinod Jun 15 '16 at 16:10
  • yes, I write the JSON code in my model class, But I have to invoke those methods whenever the page appears. – Vinod Jun 15 '16 at 16:16
  • I think it one way to avoid memory issue http://stackoverflow.com/questions/28003602/swift-how-to-link-two-view-controllers-into-one-container-view-and-switch-betw – Vinod Jun 15 '16 at 16:41

0 Answers0