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] change checkbox to use default constructor #6512
Conversation
@paymicro yea the default one could probably stand to be increased in size a bit. Did you compare the material ones between ios and Android by chance? The sizes I picked were really just to match android. |
Agreed on size. I think mine was a bit bigger originally? |
This change looks fine. I don't remembering doing that though, but looks solid change. |
Yea this was a little bit of a tricky one. Originally you had the HeightRequest on ios wired up to the drawing so it made a larger checkbox. Problem is that it didn't work on any of the other platforms and there's not a super straight forward way to make it resize on Android. Maybe down the road @paymicro could work the same magic he did on slider :-) so for now it all just sizes to a made up default that was just picked to match android. Things like the Switch and those also don't resize so should checkbox? So that leaves us with just making up some height that matches a made up control on iOS. Switch seems like a valid control to size against. Maybe just match the height of a switch and use that for the wxh
Original implementation just inherited from UIView but I changed it to UIButton to be more consistent with how other platforms do it and also this allows us to easily add text |
alright @paymicro and @jamesmontemagno I increased the size of the default checkbox to just match the height of the switch control I also just setup DefaultSize as a settable property so if someone creates a custom ios renderer they can easily change the height |
for full compliance, it remains to add the same shadows as on the switch control |
@paymicro can you log an issue for the shadow? |
Should there be a shadow? hard to say... i mean looking at iOS apps there aren't at all. This control we are sort of making up for iOS based on apps like Reminder. |
@jamesmontemagno by default the switch circle has a shadow |
AHHHHHHHH I see what you mean now, this wasn't for checkbox... i was confused. |
Description of Change
Change the FormsCheckbox inheriting from UIBUtton to not use the UIButtonType base constructor which isn't recommended. If you use the UIButtonType base constructor it throws exceptions. This PR changes it to use the default constructor
Platforms Affected
Testing Procedure
Bring up the CheckBox in the dynamic control gallery and play with the colors and various other settings to make sure it still all works correctly
PR Checklist