Last active
August 29, 2015 14:14
-
-
Save Clancey/eef859c1c5046d303268 to your computer and use it in GitHub Desktop.
This file contains 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
public override void OnActivated (UIApplication application) | |
{ | |
//When your app is backgrounded, iOS takes a snapshot. | |
//When the app comes back from the background it shows this snapshot at launch until your app is ready | |
//Sometimes apple forgets to remove the splash screen. | |
//Your app is in the forground and working. To prove it you can rotate, and see half your real screen. | |
//To prevent this from happening you can manually remove the view | |
foreach (var w in application.Windows) { | |
if (w != null && w != window) { | |
foreach (var v in w.Subviews) { | |
var desc = v.Description; | |
if (desc.Contains ("UIReplicantView")) { | |
v.RemoveFromSuperview (); | |
Xamarin.Insights.Report (new Exception("Congratulations, you just prevented a user from thinking your app was broken due to an apple bug..."),Xamarin.ReportSeverity.Warning); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment