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

[iOS] Implement iOS Platform Specifics #5879

Merged
merged 20 commits into from
May 11, 2022
Merged

[iOS] Implement iOS Platform Specifics #5879

merged 20 commits into from
May 11, 2022

Conversation

jsuarezruiz
Copy link
Contributor

@jsuarezruiz jsuarezruiz commented Apr 7, 2022

Description of Change

Implement iOS Platform Specifics.

  • Entry CursorColor.
  • Entry AdjustsFontSizeToFitWidth.
  • SearchBar SearchBarStyle.
  • DatePicker UpdateMode.
  • Picker UpdateMode.
  • TimePicker UpdateMode.

Fixes (partially) #5856


namespace Microsoft.Maui.Controls.Platform
{
public static class TextExtensions
{
public static void UpdateCursorColor(this UITextField textField, Entry entry)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


namespace Microsoft.Maui.Controls.Platform
{
public static class SearchBarExtensions
{
public static void UpdateSearchBarStyle(this UISearchBar uiSearchBar, SearchBar searchBar)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsuarezruiz jsuarezruiz marked this pull request as ready for review April 12, 2022 14:31
{
public partial class DatePicker
{
public static void MapUpdateMode(DatePickerHandler handler, DatePicker datePicker)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
public partial class Picker
{
public static void MapUpdateMode(PickerHandler handler, Picker picker)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
public partial class TimePicker
{
public static void MapUpdateMode(TimePickerHandler handler, TimePicker timePicker)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Platform.TextExtensions.UpdateCursorColor(handler.PlatformView, entry);
}

public static void MapAdjustsFontSizeToFitWidth(EntryHandler handler, Entry entry)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -2,6 +2,16 @@
{
public partial class Entry
{
public static void MapCursorColor(EntryHandler handler, Entry entry)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Apr 13, 2022
@jsuarezruiz jsuarezruiz changed the title [iOS] Implement iOSPlatform Specifics [iOS] Implement iOS Platform Specifics Apr 26, 2022
@Redth Redth added this to the 6.0.300 milestone May 5, 2022
@PureWeen PureWeen requested a review from rmarinho May 9, 2022 14:23
Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking decent. Have not tested yet.

@@ -13,6 +13,8 @@ protected override UIDatePicker CreatePlatformView()
;
}

internal bool UpdateImmediately { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be true by default since that is what the code before this PR appears to be doing? Maybe we don't want this actually and we should always set the value?

And then whatever we do here we need to also do for the other pickers on both platforms.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah makes sense since there's no "Done" button for this on catalyst

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the other mac catalyst platforms? Is this not needed on iOS?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i m not sure i follow

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean you set the value to true in 1 file, but there are 3 pickers each with 2 files mac/ios.

Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't test it all yet but here some that didn't work for me: can you take a look @jsuarezruiz ?

Blur - doesn’t work
Picker - doesn’t work
SafeArea - doesn’t work

Slider Update on tap - doesn’t work

Hide Status bar - doesn’t work
TimePicker - doesn’t work

@rmarinho
Copy link
Member

Can we also add this to the gallery, we might need to inject the ICommand to go back

@rmarinho
Copy link
Member

Also the PR descriptions says Windows, but it's iOS

@rmarinho
Copy link
Member

Ok finished review everything, here's what works and doesn't work..

Blur - doesn’t work
DatePicker - works

AdjustFont - works

VisualElement - ? 
Flyout Page - works
Hide Home - ? 

Large titles - seems it doesn’t work

Listview - works


ListView/cell - works



Modal form sheet - seems can’t get it to work 	 
Navigation - IsNavigationBarTranslucent doesn’t work
Pan gesture - yes

Picker - doesn’t work 
SafeArea - doesn’t work
ScrollView touches - works

SearchBar Style - works

Slider Update on tap - doesn’t work 

Hide Status bar - doesn’t work 
SwipeView - works
TimePicker - doesn’t work 
NavigationPage Translucent tab - doesn’t work
TabbedPage translucent - doesn’t work

Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the pickers, everything less the NavigationBar translucent seem to be working

@rmarinho rmarinho merged commit b028c71 into main May 11, 2022
@rmarinho rmarinho deleted the platform-specific-ios branch May 11, 2022 09:34
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@samhouts samhouts added the fixed-in-6.0.312 Look for this fix in 6.0.312! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-6.0.312 Look for this fix in 6.0.312! legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor platform/iOS 🍎
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants