Last active
December 26, 2015 10:39
-
-
Save therealjohn/7138336 to your computer and use it in GitHub Desktop.
BTProgressHUD issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Same results in all the ViewDidLoad, Appear, WillAppear, etc. | |
// The "Loading" dialog only shows for ~2ish seconds, then disappears. It disappears before the Dismiss(); | |
public override void LoadView () | |
{ | |
base.LoadView (); | |
BTProgressHUD.Show("Loading"); | |
try { | |
LoadSomething().ContinueWith(task => { // 10 Second task | |
var something = task.Result; | |
CreateRoot(); | |
BTProgressHUD.Dismiss(); | |
}); | |
} catch (Exception ex) { | |
BTProgressHUD.Dismiss(); | |
} | |
} | |
// Same results | |
public override async void LoadView () | |
{ | |
base.LoadView (); | |
BTProgressHUD.Show("Loading"); // This is shown. Then 2ish seconds later its gone. | |
// Screen is blank, then the CreateRoot happens and the screen loads fine and all is good except that the loading dissapears before the CreateRoot is finished. | |
try { | |
var something = await LoadSomething(); | |
CreateRoot(); | |
BTProgressHUD.Dismiss(); | |
} catch (Exception ex) { | |
// No exception is happening. | |
BTProgressHUD.Dismiss(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment