Plugin.HideShowPassword.iOS 1.0.1

dotnet add package Plugin.HideShowPassword.iOS --version 1.0.1
NuGet\Install-Package Plugin.HideShowPassword.iOS -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Plugin.HideShowPassword.iOS" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Plugin.HideShowPassword.iOS --version 1.0.1
#r "nuget: Plugin.HideShowPassword.iOS, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Plugin.HideShowPassword.iOS as a Cake Addin
#addin nuget:?package=Plugin.HideShowPassword.iOS&version=1.0.1

// Install Plugin.HideShowPassword.iOS as a Cake Tool
#tool nuget:?package=Plugin.HideShowPassword.iOS&version=1.0.1

HideShowPassword

HideShowPassword is an easy to use xamarin ios extension of UITextField and/or the MaterialComponents TextField to toggle the password visibility in a text field. Just tap the eye icon on right view to toggle visibility.

GitHub release NuGet Badge licenseGitHub Issues Contributions welcome

Install NuGet Package

Sample Usage - Native UITextField

View the sample application - * HideShowPasswordSample

  1. Add a UITextField to your Storyboard or Nib layout and select HideShowPasswordTextField as the Class
  2. Or just select the Hide Show Password Text Field from toolbox custom controls
  3. Optionally extend IHideShowPassWordTextFieldDelegate and implement IsValidPassword to show a checkmark if password is valid and set passwordDelegate
  4. Optionally extend IUITextFieldDelegate and override EditingEnded to reset secure entry when not in focus and set text field Delegate
public class ViewController : UIViewController, IHideShowPassWordTextFieldDelegate, IUITextFieldDelegate
{
	      protected ViewController(IntPtr handle) : base(handle)
        {
        }

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            InitComponents();
        }

        void InitComponents()
        {
            // Set Delegates on normal UITextField password
            password.passwordDelegate = this;
            password.Delegate = this;
            // Optionally set tint color on right view
            password.RightView.TintColor = UIColor.Blue;
        }
        
        /* Optionally implement interface member for Native UITextField IsValidPassword, 
         * To show a checkmark in field if the entered password is correct
         */
        public bool IsValidPassword(UITextField textField, string password)
        {
            return password.Length > 5;
        }
        
        [Export("textFieldDidEndEditing:")]
        public void EditingEnded(UITextField textField)
        {
            /* After editing of text field was complete, 
             * you can call the TextFieldDidEndEditing to change it back to a secure text entry.
             * 
             * You can set an Accessibility label for these text fields in the UI designer to determine from which textField the editing was ended
             */            
            switch (textField.AccessibilityLabel)
            {
                case "Password":
                    password.TextFieldDidEndEditing(textField);
                    break;
            }

        }
}

License

Xamarin HideShowPassword for iOS

Copyright (c) 2019 Xamarin HideShowPassword for iOS Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Product Compatible and additional computed target framework versions.
Xamarin.iOS xamarinios10 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 684 3/8/2019
1.0.0 533 3/7/2019

Added TextField implementation to Support MaterialComponents TextField