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

[Bug] TabbedPage "goes under" Home Bar on iOS #15612

Open
xDaijobu opened this issue Nov 23, 2022 · 12 comments
Open

[Bug] TabbedPage "goes under" Home Bar on iOS #15612

xDaijobu opened this issue Nov 23, 2022 · 12 comments
Labels
a/tabbedpage p/iOS 🍎 s/unverified New report that has yet to be verified t/bug 🐛

Comments

@xDaijobu
Copy link

Description

TabbedPage inside FlyoutPage "goes under" Home Bar on iOS

Steps to Reproduce

  1. Open & run the solution
  2. Select one of the details by clicking the 'Punch Me' Button
    Simulator Screen Shot - iPhone 14 Pro Max - 2022-11-23 at 14 11 41
IMG_6825.mov

Expected Behavior

Simulator Screen Shot - iPhone 14 Pro Max - 2022-11-23 at 14 08 47

Actual Behavior

Simulator Screen Shot - iPhone 14 Pro Max - 2022-11-23 at 14 09 03

Basic Information

  • Version with issue: Xamarin.Forms 5.0.0.2515
  • Last known good version: -
  • Platform Target Frameworks:
    • iOS 16.1

Screenshots

Reproduction Link

https://github.com/xDaijobu/BugTabbedPageiOS

Workaround

@xDaijobu xDaijobu added s/unverified New report that has yet to be verified t/bug 🐛 labels Nov 23, 2022
@xDaijobu
Copy link
Author

It only happens on the iOS simulator and device ( 14 Pro Max & 14 Pro ). Android, it's working fine ~

@jfversluis
Copy link
Member

Just to be clear: it doesn't happen on iOS if it doesn't have the Dynamic Island? So it works fine on an iOS non-Pro?

@xDaijobu
Copy link
Author

Just to be clear: it doesn't happen on iOS if it doesn't have the Dynamic Island? So it works fine on an iOS non-Pro?

yeahhh

Screenshot 2022-11-25 at 10 45 20

@xDaijobu
Copy link
Author

hmm, i just realised somethingg

there is a another bug @@
Screenshot 2022-11-25 at 11 15 03

@KMWenyon
Copy link

KMWenyon commented Jan 3, 2023

I have the same issue, can you please provide eta on fix as this has huge impact on our production applications

@Phatfisher
Copy link

Affecting our production app as well and need a fix for this. Would love to see this resolved.

@samuelGrahame
Copy link

samuelGrahame commented Feb 13, 2023

using System;
using System.Collections.Generic;
using System.Text;
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;

public static void SetDefaultPageSettings(Xamarin.Forms.Page page)
{
    page.On<Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true);            
}

if you use this does it solve the issue. as i had similar issue.

@giuseppenovielli
Copy link

giuseppenovielli commented Mar 9, 2023

@samuelGrahame your workaround not working. I set for 'SetUseSafeArea' for TabbedPage and every Page into tabbed.

@jfversluis @jsuarezruiz How i can fix this issue?

Thanks!

@samuelGrahame
Copy link

Not sure then, just commenting on this as I had a similar issue.

@giuseppenovielli
Copy link

Hi guys,
i have found a new workaround, thanks the following comment -> #14484 (comment)

So follow these steps:

  1. Use SafeArea into FlyoutPage, and all pages into tabbed pages as @samuelGrahame says:

into code behind ->

public partial class MyFlyoutPage : FlyoutPage
    {
        public MyFlyoutPage()
        {
            InitializeComponent();
            SetDefaultPageSettings(this)
        }
    }
public partial class MyPageIntoTabbedBar : ContentPage
    {
        public MyPageIntoTabbedBar()
        {
            InitializeComponent();
            SetDefaultPageSettings(this)
        }
    }
  1. Use the follow Custom TabbedPage to fix:
public class iOSDynamicIslandFixTabbedPage : TabbedPage
   public iOSDynamicIslandFixTabbedPage()
        {
            InitializeComponent();
            SetDefaultPageSettings(this)
        }
  1. Add the following CustomRenderer into iOS project
[assembly: ExportRenderer(typeof(iOSDynamicIslandFixTabbedPage), typeof(iOSDynamicIslandFixTabbedPageCustomRenderer))]
namespace <namespace>.iOS.Views
{
    public class iOSDynamicIslandFixTabbedPageCustomRenderer : TabbedRenderer
    {
        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);

            if (View == null)
                return;

            var currentFrame = View.Frame;
            View.Frame = currentFrame.Inset(0, 1);
            View.Frame = currentFrame;
        }
    }
}

Enjoy! ;)

@15mgm15
Copy link

15mgm15 commented Apr 25, 2023

@giuseppenovielli I've spent 6 hours trying to find a workaround, I owe you a beer!

@jerryg78258
Copy link

You've saved me with this workaround! Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/tabbedpage p/iOS 🍎 s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

10 participants