Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden Cells are Visible on iOS #43

Open
1 of 2 tasks
tibuprophen opened this issue Mar 5, 2025 · 1 comment
Open
1 of 2 tasks

Hidden Cells are Visible on iOS #43

tibuprophen opened this issue Mar 5, 2025 · 1 comment

Comments

@tibuprophen
Copy link


Hidden Cells are Visible on iOS

Description

Sadly, unvisible cells are somehow visible, strangely stacked and looking very ugly for the user.

Steps to Reproduce

  1. Create a new Maui Project
  2. Add SettingsView
  3. Create a new Cell based on CustomCell (can be a seperate class or inline) with example content:
<settings:SettingsView>
    <settings:Section Title="Title">
        <settings:EntryCell Title="Test" />
        <settings:CustomCell IsVisible="False">
            <Grid>
                <Label Text="adasdas" />
                <Switch />
            </Grid>
        </settings:CustomCell>
    </settings:Section>
</settings:SettingsView>
  1. Run it (on iOS) and see

Expected Behavior

Like on Android, the cell should not be visible.

Actual Behavior

The cells are visible

Platforms

  • Android
  • iOS

Basic Information

  • AiForms.SettingsView 1.0.17
  • Microsoft.Maui.Controls 9.0.40
  • Affected Devices: iOS (all devices)

Screenshots

How it looks on iOS (the last cell with switch should not be visible)

Image

How it looks on Android (properly)

Image

Reproduction Link

Repo for Repro

Workaround

I've found no Workaround yet. It's worth mentioning that it is working with the "default" AiForms Cells. So obviously something is happening in that controls, which is not happening in the CustomCell base class.

@tibuprophen
Copy link
Author

A workaround is this:

public class FixedCustomCell : CustomCell
{
    protected override void OnPropertyChanged(string? propertyName = null)
    {
        base.OnPropertyChanged(propertyName);
        if (propertyName == nameof(IsVisible))
            UpdateContainerVisibility();
        else if (propertyName == nameof(Content))
            UpdateContainerVisibility();
    }

    private void UpdateContainerVisibility()
    {
        if (Content == null)
            return;
        Content.IsVisible = IsVisible;
    }
}

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

No branches or pull requests

1 participant