Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View Controller loading from storyboard taking too much time

In my application, I am having 5 viewControllers. In which I have 4 web services call. While going from 4th controller to 5th controller, there is no web service, Still taking so much time to load.

What could be the possible possible reasons?

My observation :

  1. View controller is coming to viewDidLoad very late.
  2. Storyboard should the issue.
  3. Once I am removing custom fonts from some labels, it is working fine.
like image 342
Samkit Jain Avatar asked May 29 '15 11:05

Samkit Jain


2 Answers

You can check against some potential cases:

  1. In VC4, are you doing something in viewWillDisappear or viewDidDisappear?

  2. Make sure you are loading data asynchronously in VC4?

  3. Are you doing something bulky in viewWillAppear in VC5?

  4. If you go from VC1/2/3 to VC5, does it still take a lot of time?

like image 158
swapnilagarwal Avatar answered Nov 06 '22 17:11

swapnilagarwal


In my case, the font assigned to control(s) was wrong.

ProximaNovaSoft-Semibold font was assigned to controls, but this font did not exist. The real font was Proxima Nova Semibold.

Because ProximaNovaSoft-Semibold did not exist, the system took time to search for this font causing a delay.

After I corrected the font for some of my controls, it loads fast.

like image 36
Amit Battan Avatar answered Nov 06 '22 17:11

Amit Battan