Skip to content

Commit

Permalink
fix(commandbar): [iOS] Don't fetch the internal TitleView parent on i…
Browse files Browse the repository at this point in the history
…nvalidate measure
  • Loading branch information
jeromelaban committed Sep 9, 2021
1 parent 5d4f3ba commit 0a9a729
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Uno.UI/Controls/CommandBarNavigationItemRenderer.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,16 @@ internal partial class TitleView : Border
private Size _childSize;
private Size? _lastAvailableSize;

public override void SetSuperviewNeedsLayout()
{
// Skip the base invocation because the base fetches the native parent
// view. This process creates a managed proxy during navigations, the
// native counterpart is released. This causes the managed NSObject_Disposer:Drain
// to fail to release an already released native reference.
//
// See https://github.com/unoplatform/uno/issues/7012 for more details.
}

internal TitleView()
{
if (UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
Expand Down

0 comments on commit 0a9a729

Please sign in to comment.