ios - Swift - Preload other tab views from App Delegate -
so trying preload tab views app delegate save time on loading once user switching between tabs.
i have tried running in view controller file uitabbarcontroller (specifically in viewdidload) have had no luck. missing something?
 let = self.view  if let viewcontrollers = self.viewcontrollers {       viewcontroller in viewcontrollers {            let = viewcontroller.view       }  }      
try instantiating view controller...
first set storyboard id of view controller
then:
let storyboard = uistoryboard(name: "main", bundle: nil) let vc = storyboard.instantiateviewcontrollerwithidentifier("someviewcontroller")   note: possible if put code in app delegate, view controller uninstantiated. if case, try putting code in first view controller.
Comments
Post a Comment