All Projects → PiXeL16 → Passwordtextfield

PiXeL16 / Passwordtextfield

Licence: mit
A custom TextField with a switchable icon which shows or hides the password and enforce good password policies

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Passwordtextfield

Underlinetextfield
Simple UITextfield Subclass with state
Stars: ✭ 156 (-44.48%)
Mutual labels:  cocoapods, carthage, textfield
Tweetextfield
Lightweight set of text fields with nice animation and functionality. 🚀 Inspired by https://uimovement.com/ui/2524/input-field-help/
Stars: ✭ 421 (+49.82%)
Mutual labels:  cocoapods, carthage, textfield
Stepperview
SwiftUI iOS component for Step Indications.
Stars: ✭ 281 (+0%)
Mutual labels:  cocoapods, carthage
Uxmpdfkit
An iOS PDF viewer and annotator written in Swift that can be embedded into any application.
Stars: ✭ 260 (-7.47%)
Mutual labels:  cocoapods, carthage
Animoji
Animoji Generator 🦊
Stars: ✭ 277 (-1.42%)
Mutual labels:  cocoapods, carthage
Swiftytexttable
A lightweight library for generating text tables.
Stars: ✭ 252 (-10.32%)
Mutual labels:  cocoapods, carthage
Datez
📆 Breeze through Date, DateComponents, and TimeInterval with Swift!
Stars: ✭ 254 (-9.61%)
Mutual labels:  cocoapods, carthage
Ezswiftextensions
😏 How Swift standard types and classes were supposed to work.
Stars: ✭ 2,911 (+935.94%)
Mutual labels:  cocoapods, carthage
Simplecheckbox
A simple Checkbox
Stars: ✭ 253 (-9.96%)
Mutual labels:  cocoapods, carthage
Ribbon
🎀 A simple cross-platform toolbar/custom input accessory view library for iOS & macOS.
Stars: ✭ 273 (-2.85%)
Mutual labels:  cocoapods, carthage
Progress.swift
⌛️ Add beautiful progress bars to your loops.
Stars: ✭ 265 (-5.69%)
Mutual labels:  cocoapods, carthage
Serpent
A protocol to serialize Swift structs and classes for encoding and decoding.
Stars: ✭ 281 (+0%)
Mutual labels:  cocoapods, carthage
TTInputVisibilityController
Lightweight controller to keep your inputs visible when the keyboard is presented.
Stars: ✭ 21 (-92.53%)
Mutual labels:  carthage, textfield
Colorizeswift
Terminal string styling for Swift.
Stars: ✭ 253 (-9.96%)
Mutual labels:  cocoapods, carthage
Corestore
Unleashing the real power of Core Data with the elegance and safety of Swift
Stars: ✭ 3,254 (+1058.01%)
Mutual labels:  cocoapods, carthage
Localize
Localize is a framework writed in swift to localize your projects easier improves i18n, including storyboards and strings.
Stars: ✭ 253 (-9.96%)
Mutual labels:  cocoapods, carthage
Xcode One Dark
Atom One Dark theme for Xcode
Stars: ✭ 273 (-2.85%)
Mutual labels:  cocoapods, carthage
Audioindicatorbars
AIB indicates for your app users which audio is playing. Just like the Podcasts app.
Stars: ✭ 279 (-0.71%)
Mutual labels:  cocoapods, carthage
Harpy
Harpy checks a user's currently installed version of your iOS app against the version that is currently available in the App Store. If a new version is available, an alert can be presented to the user informing them of the newer version, and giving them the option to update the application.
Stars: ✭ 2,619 (+832.03%)
Mutual labels:  cocoapods, carthage
Wechatkit
一款快速实现微信第三方登录的框架(Swift版) SDK 1.8.5
Stars: ✭ 249 (-11.39%)
Mutual labels:  cocoapods, carthage

PasswordTextFieldBanner

Build Status codecov.io CocoaPods Compatible Carthage compatible Awesome GitHub license Language

PasswordTextField

A custom TextField with a switchable icon which shows or hides the password and enforces good password policies, written in Swift.

PasswordTextFieldGif

⭐️ Features

  • Custom toggle icon in IB or programmatically.
  • Custom icon color in IB or programmatically.
  • Custom password validation rules.
  • Custom password validation error message.
  • Control when to show the icon, while editing, always or never.

Installation

CocoaPods

You can use CocoaPods to install PasswordTextField by adding it to your Podfile:

platform :ios, '8.0'
use_frameworks!
pod 'PasswordTextField'

To get the full benefits import PasswordTextField wherever you import UIKit

import UIKit
import PasswordTextField

Carthage

Create a Cartfile that lists the framework and run carthage bootstrap. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/PasswordTextField.framework to an iOS project.

github "PiXeL16/PasswordTextField"

Manually

  1. Download and drop /PasswordTextField folder in your project.
  2. Congratulations!

🤘 Usage

  1. Open a storyboard or Xib file.
  2. Drag and drop a UITextField to a ViewController.
  3. In Identity Inspector, replace the class from UITextField to PasswordTextField and the module to PasswordTextField.
  4. Configure your properties in the Attribute Inspector.

Screenshot

Properties

Property name Data type Remark
Show Toggle Button While String Possible values are editing(default), always, never
Image Tint Color UIColor The color off the Toggle image, the functionality use UIImageRenderingMode.AlwaysTemplate to change the default or custom image color
Custom Show Secure Text Image UIImage Your custom image to show the secure text
Custom Hide Secure Text Image UIImage Your custom image to hide the secure text

Validation

PasswordTextField also provides functionality to enforce good password policies.

It will currently validate that the password format is at least 8 characters long and contain one uppercase letter and one number.

import PasswordTextField

if passwordTextField.isInvalid(){
  print(passwordTextField.errorMessage)
}

You can also provide your custom password validation format (with Regex) and error message:

import PasswordTextField

let validationRule = RegexRule(regex:"^[A-Z ]+$", errorMessage: "Password must contain only uppercase letters")

passwordTextField.validationRule = validationRule

if passwordTextField.isInvalid(){
  print(passwordTextField.errorMessage)
}

TODO

  • Show indication when password is strong or weak in TextField
  • Animation when toggling Button

👽 Author

Chris Jimenez - http://code.chrisjimenez.net, @chrisjimeneznat

🍺 Donate

If you want to buy me a beer, you can donate to my coin addresses below:

BTC

1BeGBew4CBdLgUSmvoyiU1LrM99GpkXgkj

ETH

0xa59a3793E3Cb5f3B1AdE6887783D225EDf67192d

LTC

Ld6FB3Tqjf6B8iz9Gn9sMr7BnowAjSUXaV

License

PasswordTextField is released under the MIT license. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].