Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[ios] change checkbox to use default constructor #6512

Merged
merged 1 commit into from Jun 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Xamarin.Forms.Platform.iOS/Renderers/FormsCheckBox.cs
Expand Up @@ -30,7 +30,7 @@ internal float MinimumViewSize
}
}

public FormsCheckBox() : base(UIButtonType.System)
public FormsCheckBox()
{
TouchUpInside += OnTouchUpInside;
ContentMode = UIViewContentMode.Center;
Expand Down Expand Up @@ -140,10 +140,10 @@ protected virtual UIImage GetCheckBoximage()
}

if (_checked == null)
_checked = CreateCheckBox(CreateCheckMark());
_checked = CreateCheckBox(CreateCheckMark()).ImageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate);

if (_unchecked == null)
_unchecked = CreateCheckBox(null);
_unchecked = CreateCheckBox(null).ImageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate);

return IsChecked ? _checked : _unchecked;
}
Expand Down