Skip to content

Commit

Permalink
Fix class names and de-duplicate methods
Browse files Browse the repository at this point in the history
  • Loading branch information
hartez committed Mar 18, 2021
1 parent 72b6b08 commit ef7fb50
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Microsoft.Maui
{
public static class NSAttributedStringExtensions
public static class AttributedStringExtensions
{
public static NSMutableAttributedString? WithCharacterSpacing(this NSAttributedString attributedString, double characterSpacing)
{
Expand Down
62 changes: 0 additions & 62 deletions src/Core/src/Platform/iOS/CharacterSpacingExtensions.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Microsoft.Maui
{
public static class ReturnKeyTypeExtensions
public static class ReturnTypeExtensions
{
public static UIReturnKeyType ToNative(this ReturnType returnType)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Microsoft.Maui
{
public static class AlignmentExtensions
public static class TextAlignmentExtensions
{
public static UITextAlignment ToNative(this TextAlignment alignment, bool isLtr)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/iOS/TextFieldExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static void UpdateReturnType(this UITextField textField, IEntry entry)

public static void UpdateCharacterSpacing(this UITextField textField, IText textView)
{
var textAttr = textField.AttributedText?.AddCharacterSpacing(textView.Text, textView.CharacterSpacing);
var textAttr = textField.AttributedText?.WithCharacterSpacing(textView.CharacterSpacing);

if (textAttr != null)
textField.AttributedText = textAttr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Microsoft.Maui
{
public static class EditorExtensions
public static class TextViewExtensions
{
public static void UpdateText(this UITextView textView, IEditor editor)
{
Expand All @@ -16,7 +16,7 @@ public static void UpdateText(this UITextView textView, IEditor editor)

public static void UpdateCharacterSpacing(this UITextView textView, IEditor editor)
{
var textAttr = textView.AttributedText.AddCharacterSpacing(editor.Text, editor.CharacterSpacing);
var textAttr = textView.AttributedText?.WithCharacterSpacing(editor.CharacterSpacing);

if (textAttr != null)
textView.AttributedText = textAttr;
Expand Down

0 comments on commit ef7fb50

Please sign in to comment.