--- /dev/null
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+// Apply the default category of "Issues" to all of the tests in this assembly
+// We use this as a catch-all for tests which haven't been individually categorized
+#if UITEST
+[assembly: NUnit.Framework.Category("Issues")]
+#endif
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.None, 0, "NRE when switching page on Appearing", PlatformAffected.iOS)]
+ public class Unreported1 : TestMasterDetailPage
+ {
+ static Unreported1 MDP;
+
+ class SplashPage : ContentPage
+ {
+ protected override void OnAppearing()
+ {
+ base.OnAppearing();
+
+ // You really shouldn't do this, but we shouldn't crash when you do it. :)
+ SwitchDetail();
+ }
+ }
+
+ protected override void Init()
+ {
+ MDP = this;
+
+ Master = new Page { Title = "Master" };
+ Detail = new SplashPage();
+ }
+
+ public static void SwitchDetail()
+ {
+ MDP.Detail = new ContentPage { Content = new Label { Text = "If this did not crash, this test has passed." }, Padding = 20 };
+ }
+
+#if UITEST
+ [Test]
+ public void Unreported1Test()
+ {
+ RunningApp.Screenshot("ensure there is no crash");
+ }
+#endif
+ }
+}
\ No newline at end of file
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla52533.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla53362.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla45874.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Unreported1.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla53909.cs" />
<Compile Include="$(MSBuildThisFileDirectory)_Template.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue1028.cs" />
void UpdateStatusBarPrefersHidden()
{
+ if (Element == null)
+ return;
+
var animation = ((Page)Element).OnThisPlatform().PreferredStatusBarUpdateAnimation();
if (animation == PageUIStatusBarAnimation.Fade || animation == PageUIStatusBarAnimation.Slide)
UIView.Animate(0.25, () => SetNeedsStatusBarAppearanceUpdate());