There is a view with a button by clicking on which Segue opens another View. During the execution of the PrepareForSegue, an array of data is transferred to the target View.

let detailCatItemVC: DetailController = segue.destinationViewController as! DetailController detailCatItemVC.categorySelectArray = cleanDetailArray 

and the new View is still downloading and parsing a large amount of data, and all this time, the pressed button of the first View is shown on the screen until the second View with the processed data is displayed. It is naturally necessary to show the custom Activity Indicator with the text during all this "awesome" time. There is already a show function

  progressBarDisplayer("Загрузка", true) 

and hide Activity Indicator

  self.messageFrame.removeFromSuperview() 

but the whole thing does not work, where only the method of display didn’t shove, it still doesn’t work Code working, borrowed from stackoverflow
The problem is that the indicator should be shown during the transition.

How to redraw the application or where to poke a line of the display that would be guaranteed to see Activity Indicator?

  • one
    show the code. and at the same time: if you remove the entire transition code, but just show the indicator and do nothing else, does it work? - Max Mikheyenko 8:50 pm
  • yes, it works, the code makes sense to show only this link is the second View - Sam07
  • try throwing all the code in viewDidAppear. if this does not help, try to show the indicator, and after a second run everything else - Max Mikheyenko
  • here is more detail. Even with the indicator, what you need (see the first answer) stackoverflow.com/questions/24215462/… - Valentine
  • the viewDidAppear method does not work, MBProgressHUD doesn’t feel like setting this, UIApplication sharedApplication] delegate] window has no effect - Sam07

1 answer 1

put the indicator on [[[UIApplication sharedApplication] delegate] window].

You can use something like https://github.com/jdg/MBProgressHUD

  • one
    But it is possible in more detail about UIApplication sharedApplication] delegate] window, otherwise I freaked out and it's not that in Google - Sam07