You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
Since iOS 16, the Shell TitleView is not longer displayed, as described in this bug 15512.
The workaround is to use a custom renderer dedicated to iOS 16 like this:
[assembly: ExportRenderer(typeof(Shell), typeof(CustomShellRenderer))]
namespace Your.Namespace.Here
{
public class CustomShellRenderer : ShellRenderer
{
protected override IShellPageRendererTracker CreatePageRendererTracker()
{
return new CustomShellPageRendererTracker(this);
}
}
public class CustomShellPageRendererTracker : ShellPageRendererTracker
{
public CustomShellPageRendererTracker(IShellContext context)
: base(context)
{
}
protected override void UpdateTitleView()
{
if (ViewController == null || ViewController.NavigationItem == null)
return;
var titleView = Shell.GetTitleView(Page);
if (titleView == null)
{
var view = ViewController.NavigationItem.TitleView;
ViewController.NavigationItem.TitleView = null;
view?.Dispose();
}
else
{
var view = new CustomTitleViewContainer(titleView);
ViewController.NavigationItem.TitleView = view;
}
}
}
public class CustomTitleViewContainer : UIContainerView
{
public CustomTitleViewContainer(View view) : base(view)
{
TranslatesAutoresizingMaskIntoConstraints = false;
}
public override CGSize IntrinsicContentSize => UILayoutFittingExpandedSize;
}
}
But even if the TitleView is now displayed on iOS 16, there is strange behaviour if there are ToolBarItems that are displayed at the same time, like if the TitleView is firstly displayed without the ToolBarItems, then displayed again after the display of the ToolBarItems.
This only occurs with iOS 16, and occurs each time the screen is displayed. On older versions of iOS it's not the case: there is short delay at the first display, but after that the title doesn't seem to be re-displayed.
Here are 3 small videos illustrating this issue: the issue occurs on the "Rendez-vous" Title display.
Steps to Reproduce
Create a test Flyout App in Xamarin Forms
Add a label within a <Shell.TitleView> on a XAML View.
Add ToolbarItems on the same XAML View.
Expected Behavior
The TitleView should be display at the same time as the ToolBarItems.
Actual Behavior
The TitleView is not display at the same time as the ToolBarItems.
Basic Information
Version with issue: iOS 16.0
Last known good version: any iOS version other than 16
Hey @Goldstrike, a PR (#15604) for this is open now, would you be able to grab the NuGet as described here and let us know if this fixes this issue? That will greatly speed up the review process.
Besides verifying if this particular issue is fixed also be sure to check other scenarios in the same area to make sure that this fix doesn't accidentally has side-effects 🙂
Description
Since iOS 16, the Shell
TitleView
is not longer displayed, as described in this bug 15512.The workaround is to use a custom renderer dedicated to iOS 16 like this:
But even if the
TitleView
is now displayed on iOS 16, there is strange behaviour if there areToolBarItems
that are displayed at the same time, like if theTitleView
is firstly displayed without the ToolBarItems, then displayed again after the display of theToolBarItems
.This only occurs with iOS 16, and occurs each time the screen is displayed. On older versions of iOS it's not the case: there is short delay at the first display, but after that the title doesn't seem to be re-displayed.
Here are 3 small videos illustrating this issue: the issue occurs on the "Rendez-vous" Title display.
Steps to Reproduce
Expected Behavior
The TitleView should be display at the same time as the ToolBarItems.
Actual Behavior
The TitleView is not display at the same time as the ToolBarItems.
Basic Information
Screenshots
See videos on iOS 16.0, 15.3 and 13.3:
https://we.tl/t-rG4EMrhJfm
The text was updated successfully, but these errors were encountered: