Forum Xamarin.Forms

IPhone X not detecting input below certain area

Hello,
I've discovered an issue recently in which, when tested on the iPhone X series of phones (the issue does not occur on iPhones prior to the X series), my app will not detect input below a certain area on the screen.
Below is a screenshot of my app, I can select anything above the green line but anything below that line is not selectable, this includes list items, entry boxes, etc.

Despite this issue, the buttons on the tab bar still work, so I wonder if it could possibly be to do with the tab bar blocking input in that region.

Any advice would be greatly appreciate.

Many thanks
:)

Tagged:

Answers

  • matrixlukanmatrixlukan Member ✭✭✭

    Try using SafeArea in the Xaml.cs.
    xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" ios:Page.UseSafeArea="true"

  • LandLuLandLu Member, Xamarin Team Xamurai

    What does your tabbed page look like?
    You could use Live inspect to check your application's architecture if you are consuming enterprise version.
    Moreover, Attach your sample here so that we could detect what covers your last item on iPhone X.

  • TheFaceGrabberTheFaceGrabber Member ✭✭

    @matrixlukan said:
    Try using SafeArea in the Xaml.cs.
    xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" ios:Page.UseSafeArea="true"

    Already tried this :/

  • TheFaceGrabberTheFaceGrabber Member ✭✭
    edited August 2019

    @LandLu said:
    What does your tabbed page look like?
    You could use Live inspect to check your application's architecture if you are consuming enterprise version.
    Moreover, Attach your sample here so that we could detect what covers your last item on iPhone X.

    I don't have access to the enterprise version unfortunately

    My tab page is just a empty tab page:

    <TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" 
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
                x:Class="BaseTabPage"
                xmlns:controls="clr-namespace:App">
    </TabbedPage>
    

    If it's of any help, my stack goes: tabbedpage, chats page (a list of all chats) and then the actual messenger page shown above.

    The issue doesn't seem to limited to just the messenger page but all sub-pages of the tabbedpage's children so in extension to this I've found that the input works fine when I call "PushAsyncModal" from the chats page to display the messenger but not when I call "PushAsync"

  • LandLuLandLu Member, Xamarin Team Xamurai

    @TheFaceGrabber Try to reproduce it in a sample and share here to help us look into what happened on your side. A simple tabbed page won't cause this issue.

  • TheFaceGrabberTheFaceGrabber Member ✭✭

    @LandLu said:
    @TheFaceGrabber Try to reproduce it in a sample and share here to help us look into what happened on your side. A simple tabbed page won't cause this issue.

    I have just created a new project to try and replicate this issue using the xam forms default tabbed page project but to no avail, it woks as expected in that project. I have discovered though that the issue goes away when I push the chat page on its own, without wrapping it inside of a navigation page. This is very bizarre indeed.

  • LandLuLandLu Member, Xamarin Team Xamurai

    You have to check your page's hierarchy.
    Btw, if you didn't use a navigation page to wrap your pages how can you execute the navigating?

  • TheFaceGrabberTheFaceGrabber Member ✭✭

    @LandLu said:
    You have to check your page's hierarchy.
    Btw, if you didn't use a navigation page to wrap your pages how can you execute the navigating?

    By "I have discovered though that the issue goes away when I push the chat page on its own, without wrapping it inside of a navigation page" I meant that it allows for input when I call

    Navigation.PushAsync(ChatPage);

    but not when I call

    Navigation.PushAsync(new NavigationPage (ChatPage));

    Doing both loads the chat page as I would expect but obviously without the navigation page I am unable to go back to the previous page.

    What I don't understand is why the NavigationPage is stopping input below a certain area.

  • LandLuLandLu Member, Xamarin Team Xamurai

    Why do you want to push to a page wrapping by another navigation page?
    If you can use Navigation.PushAsync(ChatPage); it means you already have a navigation page for navigating.
    There's no need to push to another navigation page.

  • TheFaceGrabberTheFaceGrabber Member ✭✭

    @LandLu said:
    Why do you want to push to a page wrapping by another navigation page?
    If you can use Navigation.PushAsync(ChatPage); it means you already have a navigation page for navigating.
    There's no need to push to another navigation page.

    The issue is that if I just use Navigation.PushAsync(ChatPage); then I don't get the bar at the top with the back button

  • LandLuLandLu Member, Xamarin Team Xamurai

    @TheFaceGrabber If you used navigation page wrapping your content why will the navigation bar dismiss?
    Did you hide the navigation bar somewhere else?
    You should consume the original navigation page instead of creating a new navigation page to display a new navigation bar.

  • TheFaceGrabberTheFaceGrabber Member ✭✭

    @LandLu said:
    @TheFaceGrabber If you used navigation page wrapping your content why will the navigation bar dismiss?
    Did you hide the navigation bar somewhere else?
    You should consume the original navigation page instead of creating a new navigation page to display a new navigation bar.

    You are correct, I had line of code that was hiding the navigation bar hidden within my constructor. The issue I'm having now is getting the back button is show on the navbar, I've tried

    NavigationPage.SetHasBackButton(this,true);

    but to no avail

  • LandLuLandLu Member, Xamarin Team Xamurai

    The back button is aligned on the navigation bar.
    If you have hidden the navigation bar using NavigationPage.SetHasNavigationBar(this, false); the back button will dismiss too.
    So this code NavigationPage.SetHasBackButton(this,true); doesn't work.

  • TheFaceGrabberTheFaceGrabber Member ✭✭
    > @LandLu said:
    > The back button is aligned on the navigation bar.
    > If you have hidden the navigation bar using NavigationPage.SetHasNavigationBar(this, false); the back button will dismiss too.
    > So this code NavigationPage.SetHasBackButton(this,true); doesn't work.

    The navigation bar is showing now as I have removed the code that stopped it from displaying, but the back button isn’t showing despite using the code you mentioned above.
  • LandLuLandLu Member, Xamarin Team Xamurai

    If you didn't hide the back button on your current page the button should be displayed.
    Please check your code. Have you written a custom renderer to customize the left bar button item? Or have you added some extra code to change the appearance(including bar text color)?

Sign In or Register to comment.