-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[iOS] Implement VerticalTextAlignment property in Label #3714
Conversation
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D:\agent\1\s\src\Core\src\Platform\iOS\MauiLabel.cs(37,64): error CS0246: The type or namespace name 'nfloat' could not be found (are you missing a using directive or an assembly reference?) [D:\agent\1\s\src\Core\src\Core-net6.csproj]
We hve to move to new code of nfloat
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsuarezruiz i'm seeing a crash on catalyst / ios can you please investigate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see VerticalTextAlignment.End (blue) is working, but it doesn't seem like VerticalTextAlignment.Start (pink) and VerticalTextalignment.Center (yellow) are
<Label
BackgroundColor="Pink"
VerticalTextAlignment="Start"
Text="This should be at the top"
HeightRequest="100"/>
<Label
BackgroundColor="Yellow"
VerticalTextAlignment="Center"
Text="This should be at the middle"
HeightRequest="100"/>
<Label
BackgroundColor="Blue"
VerticalTextAlignment="End"
Text="This should be at the bottom"
HeightRequest="100"/>
Still freezing on Catalyst... not sure why... |
I fixed the infinite loop and VTA if you're not using a background on the label. When you use a background on a Label it places the UILabel inside a WrapperView. The WrapperView resets the Frame every time a layout occurs. I didn't find an obvious way to account for this so I think we should just merge this and log a bug for the WrapperView variation. The original PR had kind of the opposite problem. It worked in some cases with the I changed the code so it sets the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
confirming it works without the background color! |
Description of Change
Implement
VerticalTextAlignment
property in iOS Label.PR Checklist
Does this PR touch anything that might affect accessibility?