-
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
Implemented ios:Slider.UpdateOnTap #20124
base: main
Are you sure you want to change the base?
Conversation
Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
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.
Could you include a sample to allow check/test the platform specific here: https://github.com/dotnet/maui/tree/main/src/Controls/samples/Controls.Sample/Pages/PlatformSpecifics/iOS?
@jsuarezruiz sure I will do it later today |
@jsuarezruiz the sample page has already been in the code https://github.com/dotnet/maui/blob/main/src/Controls/samples/Controls.Sample/Pages/PlatformSpecifics/iOS/iOSSliderUpdateOnTapPage.xaml |
640aaf4
to
b842bc7
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
This seems a bit wonky when using a centered Slider and a fixed width, I'm getting negative values that are being set. Perhaps something is still missing compared to Xamarin? |
@Yves-Be you're absolutely right! Thank you yot pointing it out! |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
4175ce8
to
5a0e65a
Compare
{ | ||
if (_sliderTapRecognizer == null) | ||
{ | ||
_sliderTapRecognizer = new UITapGestureRecognizer((recognizer) => |
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.
This is capturing the handler and thus the platform view and virtual view (which also holds on to the handler) creating a circular reference I think. @jonathanpeppers?
Maybe we need to add a specific memory leak test for this?
Or, maybe we need another proxy type situation to avoid even doing anything remotely scary of keeping the universe alive.
Might just be able to add this into the slider proxy that already exists...
@@ -30,6 +31,38 @@ protected override void DisconnectHandler(UISlider platformView) | |||
_proxy.Disconnect(platformView); | |||
} | |||
|
|||
internal void MapUpdateOnTap(bool isMapUpdateOnTapEnabled) |
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.
@PureWeen do we have "design docs" on where this should live? For other Controls-only things we just kept it in the XAML control class?
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.
Yea, if we're not adding an interface at the core level then controls level inside the xaml class makes sense
Description of Change
I implemented the ios:Slider.UpdateOnTap property in the same way it has been implemented in Xamarin Forms
Issues Fixed
Fixes #20098
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-01-24.at.01.02.02.mp4