Ich kann Ihnen raten, die LilithProgressHUD zu verwenden. Es ist die beste Aktivitätsanzeige, die ich je benutzt habe.
es installieren mit pod 'LilithProgressHUD'
.
//Import LilithProgressHUD
import LilithProgressHUD
//Show the HUD
LilithProgressHUD.show()
//Hide the HUD
LilithProgressHUD.hide()
die buchstäblich es ist ...
So in Ihrem Beispiel:
@IBAction func NextViewController(sender: AnyObject) {
LilithProgressHUD.show()
}
das wäre es ... Am NextViewController
viewDidLoad würden Sie dann LilithProgressHUD.hide()
nennen.
Auch. Ich habe die Eigenschaften der Ansicht in meinem AppDelegate festgelegt.
LilithProgressHUD.size = (self.window?.frame.size.height)! // sets the size to the size of my App
LilithProgressHUD.opacity = 0.75 // sets the opacity nice to a value where you can slightly see the App
dies Siehe: http://stackoverflow.com/questions/28785715/how-to-display-an-activity-indicator-with-text-on-ios-8-with-swift – Santosh
Vielen Dank, aber es hilft mir nicht :( – Dakata