Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

iOS: Navigating back from page with HasNavigationBar=false resizes page incorrectly #2178

Closed
shnaz opened this issue Mar 24, 2018 · 5 comments

Comments

@shnaz
Copy link

shnaz commented Mar 24, 2018

Description

We have a problem where the content of a page(1) WITH NavigationBar is cut off at the bottom when navigating BACK from a page(2) WITHOUT NavigationBar. Seems like the page is incorrectly updating its size on reappearing based on the old value of NavigationBar.HasNavigationBar.
I am setting the property in the constructor like this:

		public Page2()
		{
			InitializeComponent();
			NavigationPage.SetHasNavigationBar(this, false);
		}

Steps to Reproduce

  1. You have Page1 with a NavigationBar.
    Page1 has two Labels. LabelA FillAndExpands and LabelB is 70 pts in height.
  2. Push Page2 with no NavigationBar, HasNavigationBar=false
  3. Now pop Page2 and witness that LabelB is cut off

Expected Behavior

Page1 shows the whole content on reappearring

Actual Behavior

Page1 content is cut off by the same amount of height as the iOS NavigationBar.

Basic Information

  • Version with issue:
  • Last known good version: -
  • IDE:
    Visual Studio For Mac 7.4
  • Platform Target Frameworks:
    iOS: 11.2
  • Nuget Packages:
    Xamarin.Forms 2.5.0.280555
  • Affected Devices:
    iPhones
    iPads
    iOS Simulators

Screenshots

hasnavigationbarerrordemo

Reproduction Link

NavigationBarErrorSample.zip

@shnaz shnaz changed the title Navigating back from page with HasNavigationBar=false resizes page incorrectly iOS: Navigating back from page with HasNavigationBar=false resizes page incorrectly Mar 24, 2018
@alickmail
Copy link

alickmail commented Mar 27, 2018

I got the same problem too, here is my development environment:

Visual Studio Community 2017 for Mac

  • Version 7.4.1 (build 48)
  • Runtime:
    Mono 5.8.1.0 (2017-10) (64-bit)
    GTK+ 2.24.23 (Raleigh theme)
    Package version: 508010000

NuGet

Version: 4.3.1.4445

.NET Core

  • Runtime: /usr/local/share/dotnet/dotnet
  • Runtime Versions:
    2.0.5
    2.0.0
  • SDK: /usr/local/share/dotnet/sdk/2.1.4/Sdks
  • SDK Versions:
    2.1.4
    2.0.0
  • MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.8.1/lib/mono/msbuild/15.0/bin/Sdks

Xamarin.Profiler

  • Version: 1.6.1
  • Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools

  • Xcode 9.2 (13772)
  • Build 9C40b

Xamarin.Mac

  • Version: 4.2.1.28 (Visual Studio Community)

Xamarin.iOS

  • Version: 11.8.1.28 (Visual Studio Community)
  • Branch: d15-6
  • Build date: 2018-03-09 16:22:34-0500

Xamarin.Android

  • Version: 8.2.0.16 (Visual Studio Community)
    Supported Android versions:
    6.0 (API level 23)
    7.1 (API level 25)

  • SDK Tools Version: 26.1.1

  • SDK Platform Tools Version: 27.0.1

  • SDK Build Tools Version: 26.0.3

@PureWeen
Copy link
Contributor

Hey @shnaz thanks for the great bug report

Can you test against
2.5.1.392594-pre3

Let me know if you still have the issue?

I ran your sample against 2.5.0.280555 Saw the issue and then upgraded to 2.5.1.392594-pre3 and it seems to be fixed.

Please re-open if this doesn't appear to be fixed in pre3

@shnaz
Copy link
Author

shnaz commented Mar 28, 2018

Hi @PureWeen

Great! I can confirm that the issue is resolved with 2.5.1.392594-pre3.
Do you know when to expect this change to be released?

@shnaz
Copy link
Author

shnaz commented Mar 29, 2018

Same as this issue: #1426

@PureWeen
Copy link
Contributor

Should be soon just has to go through a few more screenings. So if those all pass then it should be soon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants